mirror of
https://github.com/janet-lang/janet
synced 2025-10-30 07:03:02 +00:00
Add with-syms and combine bignat_add and bignatr mul
into a single operation for strtod.c
This commit is contained in:
@@ -652,6 +652,11 @@
|
||||
(array/concat res (f x)))
|
||||
res)
|
||||
|
||||
(defmacro with-syms
|
||||
"Evaluates body with each symbol in syms bound to a generated, unique symbol."
|
||||
[syms & body]
|
||||
~(let ,(mapcat (fn [s] @[s (tuple gensym)]) syms) ,;body))
|
||||
|
||||
(defn filter
|
||||
"Given a predicate, take only elements from an array or tuple for
|
||||
which (pred element) is truthy. Returns a new array."
|
||||
|
||||
Reference in New Issue
Block a user