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
2
Task/Call-a-function/LFE/call-a-function-1.lfe
Normal file
2
Task/Call-a-function/LFE/call-a-function-1.lfe
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
(defun my-func()
|
||||
(: io format '"I get called with NOTHING!~n"))
|
||||
3
Task/Call-a-function/LFE/call-a-function-2.lfe
Normal file
3
Task/Call-a-function/LFE/call-a-function-2.lfe
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
> (my-func)
|
||||
I get called with NOTHING!
|
||||
ok
|
||||
2
Task/Call-a-function/LFE/call-a-function-3.lfe
Normal file
2
Task/Call-a-function/LFE/call-a-function-3.lfe
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
(defun my-func(a b)
|
||||
(: io format '"I got called with ~p and ~p~n" (list a b)))
|
||||
3
Task/Call-a-function/LFE/call-a-function-4.lfe
Normal file
3
Task/Call-a-function/LFE/call-a-function-4.lfe
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
> (my-func '"bread" '"cheese")
|
||||
I got called with "bread" and "cheese"
|
||||
ok
|
||||
14
Task/Call-a-function/LFE/call-a-function-5.lfe
Normal file
14
Task/Call-a-function/LFE/call-a-function-5.lfe
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
(defmodule args
|
||||
(export all))
|
||||
|
||||
(defun my-func ()
|
||||
(my-func () () ()))
|
||||
|
||||
(defun my-func (a)
|
||||
(my-func a () ()))
|
||||
|
||||
(defun my-func (a b)
|
||||
(my-func a b ()))
|
||||
|
||||
(defun my-func (a b c)
|
||||
(: io format '"~p ~p ~p~n" (list a b c)))
|
||||
16
Task/Call-a-function/LFE/call-a-function-6.lfe
Normal file
16
Task/Call-a-function/LFE/call-a-function-6.lfe
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
> (slurp '"args.lfe")
|
||||
#(ok args)
|
||||
> (my-func)
|
||||
[] [] []
|
||||
ok
|
||||
> (my-func '"apple")
|
||||
"apple" [] []
|
||||
ok
|
||||
> (my-func '"apple" '"banana")
|
||||
"apple" "banana" []
|
||||
ok
|
||||
> (my-func '"apple" '"banana" '"cranberry")
|
||||
"apple" "banana" "cranberry"
|
||||
ok
|
||||
> (my-func '"apple" '"banana" '"cranberry" '"bad arg")
|
||||
exception error: #(unbound_func #(my-func 4))
|
||||
4
Task/Call-a-function/LFE/call-a-function-7.lfe
Normal file
4
Task/Call-a-function/LFE/call-a-function-7.lfe
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
...
|
||||
(cond ((== count limit) (hit-limit-func arg-1 arg-2))
|
||||
((/= count limit) (keep-going-func count)))
|
||||
...
|
||||
2
Task/Call-a-function/LFE/call-a-function-8.lfe
Normal file
2
Task/Call-a-function/LFE/call-a-function-8.lfe
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
> (>= 0.5 (: math sin 0.5))
|
||||
true
|
||||
2
Task/Call-a-function/LFE/call-a-function-9.lfe
Normal file
2
Task/Call-a-function/LFE/call-a-function-9.lfe
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
(let ((x (: math sin 0.5)))
|
||||
...)
|
||||
Loading…
Add table
Add a link
Reference in a new issue