Skip to content

Commit 8a8611d

Browse files
committed
chore(docs): add documentation for apply
1 parent 3983ae8 commit 8a8611d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs/arkdoc/Builtins.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,3 +115,15 @@
115115
* (print (hasField closure "B")) # false, field names are case-sensitive
116116
* =end
117117
#--
118+
119+
--#
120+
* @name apply
121+
* @brief Call a function with a list of arguments
122+
* @param f function
123+
* @param args list, can be empty if the function takes no argument
124+
* =begin
125+
* (print (apply + [1 2])) # 3
126+
* (let foo (fun (a b c) (+ a b c)))
127+
* (print (apply foo [1 2 3])) # 6
128+
* =end
129+
#--

0 commit comments

Comments
 (0)