Open countvajhula opened 1 month ago
So is zip
as proposed something like (-> (list/c x ...) ... (values (list/c x ...) ...))
, transposing?
Said another way, if we make a table like
values 1 | 2 | 3
a | b | c
d | e | f
Then zip takes (values '(a d) '(b e) '(c f))
and transposes to (values '(a b c) '(d e f))
? I think I see how that's like Python's zip.
This problem was posed by @soegaard on Discord:
It would be nice if the following worked:
Note this version is slightly different from the original posed question in that it accepts values directly rather than a list of values. Likewise, the
zip
should yield multiple lists as independent values, rather than a single list containing them all.(@benknoble suggested the introduction of a values-oriented form analogous to by that would allow for a different solution here -- this form also sounds like it would be a good addition, to
qi
core rather thanqi/list
).