tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 deletions
9
Task/Pascals-triangle/Qi/pascals-triangle.qi
Normal file
9
Task/Pascals-triangle/Qi/pascals-triangle.qi
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
(define iterate
|
||||
_ _ 0 -> []
|
||||
F V N -> [V|(iterate F (F V) (1- N))])
|
||||
|
||||
(define next-row
|
||||
R -> (MAPCAR + [0|R] (append R [0])))
|
||||
|
||||
(define pascal
|
||||
N -> (iterate next-row [1] N))
|
||||
Loading…
Add table
Add a link
Reference in a new issue