Add tasks for all the new languages

This commit is contained in:
Tina Müller 2016-12-05 23:44:36 +01:00
parent 9dc3c2bb62
commit bba7bfd280
13208 changed files with 134745 additions and 0 deletions

View file

@ -0,0 +1,24 @@
(define friends '( albert ludwig elvis 🌀))
(for-each write friends)→ albert ludwig elvis 🌀
; for loop
(for ((friend friends)) (write friend)) → albert ludwig elvis 🌀
; map a function
(map string-upcase friends) → ("ALBERT" "LUDWIG" "ELVIS" "🌀")
(map string-randcase friends) → ("ALBerT" "LudWIG" "elVis" "🌀")
; recursive way
(define (rscan L)
(unless (null? L)
(write (first L))
(rscan (rest L))))
(rscan friends) → albert ludwig elvis 🌀
; folding a list
; check that ∑ 1..n = n (n+1)/2
(define L (iota 1001))
(foldl + 0 L) → 500500 ; 1000 * 1001 / 2