(collect) macro

This commit is contained in:
2021-04-25 14:30:37 -06:00
parent 2f80b09f37
commit 72a504eb56
3 changed files with 14 additions and 0 deletions

View File

@@ -27,6 +27,10 @@
// Array access is via nth
(defvar myArrayLast (nth myArray -1))
// (collect) turns iterators to arrays
(defun _testCollect []
(Assert.equals "[0,1,2]" (Std.string (collect (range 3)))))
// Variadic math uses haxe's Lambda.fold under the hood
(defvar mySum (+ 1 2 3))