aboutsummaryrefslogtreecommitdiffhomepage
path: root/gtwiwtg.lisp
diff options
context:
space:
mode:
authorColin Okay <cbeok@protonmail.com>2020-07-10 08:24:27 -0500
committerColin Okay <cbeok@protonmail.com>2020-07-10 08:24:27 -0500
commit674824f91bf30c31086a069ce55a0d98ff279d6d (patch)
tree9651d5dff24571846bdf4f4311f10563b453452e /gtwiwtg.lisp
parent389582c4d1e18de495e05c48e9309ba668147705 (diff)
added indexed!
Diffstat (limited to 'gtwiwtg.lisp')
-rw-r--r--gtwiwtg.lisp4
1 files changed, 4 insertions, 0 deletions
diff --git a/gtwiwtg.lisp b/gtwiwtg.lisp
index caf5be7..0ac6578 100644
--- a/gtwiwtg.lisp
+++ b/gtwiwtg.lisp
@@ -462,6 +462,10 @@ Error Conditions:
"Is a shortcut for (MAP! #'LIST GEN1 GEN2 ...)"
(apply #'map! #'list gen gens))
+(defun indexed! (gen)
+ "Is shorthand for (ZIP! (RANGE) GEN)"
+ (zip! (range) gen))
+
(defun merge! (comparator gen1 gen2 &rest gens)
"Emulates the behavior of MERGE (in the ANSI standard), but for generators.