Sha256: 2a3b1e455438cd573029c22e17d1100f04da99abe2a9cfb530116408d4b17bd5
Contents?: true
Size: 317 Bytes
Versions: 129
Compression:
Stored size: 317 Bytes
Contents
module PascalsTriangle let rows numberOfRows : int list list option = match numberOfRows with | r when r < 0 -> None | _ -> let row i = [1 .. i - 1] |> List.scan (fun acc j -> acc * (i - j) / j) 1 [1..numberOfRows] |> List.map row |> Some
Version data entries
129 entries across 129 versions & 1 rubygems