Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- main = return ()
- paskal list n i =
- if i == n then
- [list]
- else
- paskal (list++[[1]++(calcRow list i 1)]) n (i+1)
- calcRow list n index =
- if index == n then
- [1]
- else
- [list !! (n-1) !! index + list !! (n-1) !! (index-1)]++(calcRow list n (index+1))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement