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,21 @@
|
|||
(lib 'math)
|
||||
(mean '(1 2 3 4)) ;; mean of a list
|
||||
→ 2.5
|
||||
(mean #(1 2 3 4)) ;; mean of a vector
|
||||
→ 2.5
|
||||
|
||||
(lib 'sequences)
|
||||
(mean [1 3 .. 10]) ;; mean of a sequence
|
||||
→ 5
|
||||
|
||||
;; error handling
|
||||
(mean 'elvis)
|
||||
⛔ error: mean : expected sequence : elvis
|
||||
(mean ())
|
||||
💣 error: mean : null is not an object
|
||||
(mean #())
|
||||
😐 warning: mean : zero-divide : empty-vector
|
||||
→ 0
|
||||
(mean [2 2 .. 2])
|
||||
😁 warning: mean : zero-divide : empty-sequence
|
||||
→ 0
|
||||
Loading…
Add table
Add a link
Reference in a new issue