mirror of
https://github.com/janet-lang/janet
synced 2025-10-09 13:02:28 +00:00
Change syntax for namespaces.
Add quasiquote, unquote, and unquote-splicing as specials rather than a macro.
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
(loop [x :range [x1 (+ 1 x2)]
|
||||
:after (print)
|
||||
y :range [y1 (+ 1 y2)]]
|
||||
(file.write stdout (if (get cellset (tuple x y)) "X " ". ")))
|
||||
(file/write stdout (if (get cellset (tuple x y)) "X " ". ")))
|
||||
(print))
|
||||
|
||||
#
|
||||
|
@@ -2,8 +2,8 @@
|
||||
# of the triangle to the leaves of the triangle.
|
||||
|
||||
(defn myfold [xs ys]
|
||||
(let [xs1 (tuple.prepend xs 0)
|
||||
xs2 (tuple.append xs 0)
|
||||
(let [xs1 (tuple/prepend xs 0)
|
||||
xs2 (tuple/append xs 0)
|
||||
m1 (map + xs1 ys)
|
||||
m2 (map + xs2 ys)]
|
||||
(map max m1 m2)))
|
||||
|
@@ -10,5 +10,5 @@
|
||||
(for j 0 len
|
||||
(def trial (get list j))
|
||||
(if (zero? (% i trial)) (:= isprime? false)))
|
||||
(if isprime? (array.push list i)))
|
||||
(if isprime? (array/push list i)))
|
||||
list)
|
||||
|
Reference in New Issue
Block a user