PascalsTriangle - 0.1.0



Pascal's triangle is the arrangement of binomial coefficients in a triangular array. The rows of the triangle are staggered so that each number can be computed as the sum of the numbers to the left and right in the previous row. The function pascal produces the triangle to a given depth.


zipWith : {A : Type} {B : Type} {C : Type} (A B C) List A List B List CSource#

iterate : {A : Type} Nat (A A) A List ASource#

Return a list of repeated applications of a given function

singleton : {A : Type} A List ASource#

Produce a singleton List

axiom ++str : String String StringSource#

Concatenation of Strings

concat : List String StringSource#

Concatenates a list of strings concat (("a" :: nil) :: "b" :: nil) evaluates to "a" :: "b" :: nil

unlines : List String StringSource#

Joins a list of strings with the newline character

pascalNextRow : List Nat List NatSource#

Compute the next row of Pascal's triangle

pascal : Nat List (List Nat)Source#

Produce Pascal's triangle to a given depth