September 2017 Update

This commit is contained in:
Ingy döt Net 2017-09-23 10:01:46 +02:00
parent bba7bfd280
commit ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions

View file

@ -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))))