Sha256: 733d5bc51304fd0bb78bc16c860ad3ad89e400400d657e6f384b5e600086eac2

Contents?: true

Size: 187 Bytes

Versions: 267

Compression:

Stored size: 187 Bytes

Contents

module PascalsTriangle
    
let triangle rows = 
    let row i = 
        [1 .. i - 1] 
        |> List.scan (fun acc j -> acc * (i - j) / j) 1 
   
    [1..rows] 
    |> List.map row 

Version data entries

267 entries across 267 versions & 1 rubygems

Version Path
trackler-2.2.1.49 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.2.1.48 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.2.1.47 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.2.1.46 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.2.1.45 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.2.1.44 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.2.1.43 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.2.1.42 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.2.1.41 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.2.1.40 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.2.1.39 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.2.1.38 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.2.1.37 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.2.1.36 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.2.1.35 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.2.1.34 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.2.1.33 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.2.1.32 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.2.1.31 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.2.1.30 tracks/fsharp/exercises/pascals-triangle/Example.fs