slice is amazing, @olasd is amazing, I love everything.
This commit is contained in:
parent
110476901c
commit
cc2f45be69
@ -52,10 +52,8 @@
|
|||||||
; basecase, let's just slip right in.
|
; basecase, let's just slip right in.
|
||||||
`(for* [~@args] ~@body)
|
`(for* [~@args] ~@body)
|
||||||
; otherwise, let's do some legit handling.
|
; otherwise, let's do some legit handling.
|
||||||
(let [[it (iter args)]
|
(let [[alist (slice args 0 nil 2)]
|
||||||
[az (list (zip it it))]
|
[ilist (slice args 1 nil 2)]]
|
||||||
[alist (list-comp (get x 0) [x az])]
|
|
||||||
[ilist (list-comp (get x 1) [x az])]]
|
|
||||||
`(do
|
`(do
|
||||||
(import itertools)
|
(import itertools)
|
||||||
(for* [(, ~@alist) (itertools.product ~@ilist)] ~@body))))))
|
(for* [(, ~@alist) (itertools.product ~@ilist)] ~@body))))))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user