Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
|
|
@ -0,0 +1,11 @@
|
|||
(define (FFR n)
|
||||
(+ (FFR (1- n)) (FFS (1- n))))
|
||||
|
||||
(define (FFS n)
|
||||
(define next (1+ (FFS (1- n))))
|
||||
(for ((k (in-naturals next)))
|
||||
#:break (not (vector-search* k (cache 'FFR))) => k
|
||||
))
|
||||
|
||||
(remember 'FFR #(0 1)) ;; init cache
|
||||
(remember 'FFS #(0 2))
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
(define-macro m-range [a .. b] (range a (1+ b)))
|
||||
|
||||
(map FFR [1 .. 10])
|
||||
→ (1 3 7 12 18 26 35 45 56 69)
|
||||
|
||||
;; checking
|
||||
(equal? [1 .. 1000] (list-sort < (append (map FFR [1 .. 40]) (map FFS [1 .. 960]))))
|
||||
→ #t
|
||||
Loading…
Add table
Add a link
Reference in a new issue