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.29 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.2.1.28 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.2.1.27 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.2.1.26 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.2.1.25 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.2.1.24 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.2.1.23 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.2.1.22 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.2.1.21 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.2.1.20 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.2.1.19 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.2.1.18 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.2.1.17 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.2.1.16 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.2.1.15 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.2.1.14 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.2.1.13 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.2.1.12 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.2.1.11 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-2.2.1.10 tracks/fsharp/exercises/pascals-triangle/Example.fs