This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pascal :: Z2 Int Int Integer | |
pascal = evaluate $ sheet (0,0) 0 $ | |
repeat 1 : repeat (1 : pascalRow) | |
where pascalRow = repeat $ cell above + cell left | |
pascalLists :: [[Integer]] | |
pascalLists = map pascalList [0..] | |
where | |
pascalList n = | |
map view . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
evaluate :: ComonadApply f => f (f b -> b) -> f b | |
evaluate fs = fix $ (fs <@>) . duplicate |
NewerOlder