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-1.0.2.1 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-1.0.2.0 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-1.0.1.2 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-1.0.1.1 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-1.0.1.0 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-1.0.0.1 tracks/fsharp/exercises/pascals-triangle/Example.fs
trackler-1.0.0 tracks/fsharp/exercises/pascals-triangle/Example.fs