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.1.0.31 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.1.0.30 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.1.0.29 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.1.0.28 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.1.0.27 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.1.0.26 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.1.0.25 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.1.0.24 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.1.0.23 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.1.0.22 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.1.0.21 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.1.0.20 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.1.0.19 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.1.0.18 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.1.0.17 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.1.0.16 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.1.0.15 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.1.0.14 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.1.0.13 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.1.0.12 tracks/fsharp/exercises/pascals-triangle/Example.fs