September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
|
|
@ -4,11 +4,7 @@
|
|||
(define (next-row current-row)
|
||||
(map + (cons 0 current-row)
|
||||
(append current-row '(0))))
|
||||
(let-values
|
||||
([(previous-rows final-row)
|
||||
(for/fold ([triangle null]
|
||||
[row '(1)])
|
||||
([row-number (in-range 1 n)])
|
||||
(values (cons row triangle)
|
||||
(next-row row)))])
|
||||
(reverse (cons final-row previous-rows))))
|
||||
(reverse
|
||||
(for/fold ([triangle '((1))])
|
||||
([row (in-range 1 n)])
|
||||
(cons (next-row (first triangle)) triangle))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue