Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
19
Task/Call-a-function/XLISP/call-a-function.l
Normal file
19
Task/Call-a-function/XLISP/call-a-function.l
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
; call a function (procedure) with no arguments:
|
||||
(foo)
|
||||
|
||||
; call a function (procedure) with arguments:
|
||||
(foo bar baz)
|
||||
; the first symbol after "(" is the name of the function
|
||||
; the other symbols are the arguments
|
||||
|
||||
; call a function on a list of arguments formed at run time:
|
||||
(apply foo bar)
|
||||
|
||||
; In a REPL, the return value will be printed.
|
||||
; In other contexts, it can be fed as argument into a further function:
|
||||
(foo (bar baz))
|
||||
; this calls bar on the argument baz and then calls foo on the return value
|
||||
|
||||
; or it can simply be discarded
|
||||
(foo bar)
|
||||
; nothing is done with the return value
|
||||
Loading…
Add table
Add a link
Reference in a new issue