mirror of
https://github.com/janet-lang/janet
synced 2024-12-25 16:00:27 +00:00
Fix loop :iterate.
This commit is contained in:
parent
0bad523913
commit
25a93ac4a6
@ -305,6 +305,7 @@
|
||||
~(do
|
||||
(var ,i nil)
|
||||
(while (set ,i ,expr)
|
||||
(def ,binding ,i)
|
||||
,body))))
|
||||
|
||||
(defn- loop1
|
||||
@ -713,7 +714,7 @@
|
||||
|
||||
(defn juxt*
|
||||
"Returns the juxtaposition of functions. In other words,
|
||||
((juxt* a b c) x) evaluates to ((a x) (b x) (c x))."
|
||||
((juxt* a b c) x) evaluates to [(a x) (b x) (c x)]."
|
||||
[& funs]
|
||||
(fn [& args]
|
||||
(def ret @[])
|
||||
|
@ -45,6 +45,8 @@ int system_test() {
|
||||
assert(janet_equals(janet_wrap_number(1.4), janet_wrap_number(1.4)));
|
||||
assert(janet_equals(janet_wrap_number(3.14159265), janet_wrap_number(3.14159265)));
|
||||
|
||||
assert(NULL != &janet_wrap_nil);
|
||||
|
||||
assert(janet_equals(janet_cstringv("a string."), janet_cstringv("a string.")));
|
||||
assert(janet_equals(janet_csymbolv("sym"), janet_csymbolv("sym")));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user