Data update

This commit is contained in:
Ingy döt Net 2025-08-11 18:05:26 -07:00
parent 4d5544505c
commit 4924dd0264
3073 changed files with 55820 additions and 4408 deletions

View file

@ -0,0 +1,4 @@
# function call with no arguments
(foo)
# function call with fixed number of arguments
(bar 1 2)

View file

@ -0,0 +1,3 @@
(macro foo (...args) (print args))
(foo) # => []
(foo 1 2 3) # => [1 2 3]

View file

@ -0,0 +1,6 @@
(let foo (fun ()
4 # this value will be discarded as it has no effect
(compute_something 1 2 3) # the return value will be discarded too
5 ))
(print (foo)) # => 5

View file

@ -0,0 +1,6 @@
(mut a 5)
(let foo (fun (bar)
(set bar 12)))
(print a) # => 5
(foo a)
(print a) # => 5

View file

@ -0,0 +1,3 @@
(if (= 5 (foo))
(compute_something)
(print "uhoh"))

View file

@ -0,0 +1,4 @@
(let foo (fun () ()))
(print (type foo)) # => Function
(print (type print)) # => CProc

View file

@ -0,0 +1,8 @@
(import std.Macros)
(let test_func (fun (a b c) (* a b c)))
(let test_func1 (partial test_func 1))
(let test_func2 (partial test_func1 2))
(print (test_func1 2 3)) # => 6
(print (test_func2 3)) # => 6