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,15 @@
|
|||
;; adapted from Racket
|
||||
;; (compose f g h ... ) is a built-in defined as :
|
||||
;; (define (compose f g) (λ (x) (f (g x))))
|
||||
|
||||
(define (cube x) (expt x 3))
|
||||
(define (cube-root x) (expt x (// 1 3)))
|
||||
(define funlist (list sin cos cube))
|
||||
(define ifunlist (list asin acos cube-root))
|
||||
|
||||
(for ([f funlist] [i ifunlist])
|
||||
(writeln ((compose i f) 0.5)))
|
||||
→
|
||||
0.5
|
||||
0.4999999999999999
|
||||
0.5
|
||||
Loading…
Add table
Add a link
Reference in a new issue