
Maybe i missed something but can’t you yield a list directly instead?

And then in-generator
which should avoid the need for (in-range 3)
i think

@wanderley.guimaraes @samdphillips https://docs.racket-lang.org/htdp-langs/beginner.html?q=...#%28part._beginner._.Template._.Variables%29

Personally, I like ’todo

I have n lists: list1 list2 … listn. I want to do a zip, (map list list1 list2 … listn), but what I have is (list list1 list2 … listn). How can I do that (drop the contents of the list into (map list _) ? Maybe I need more coffee.

@gknauth (apply map list l)

Thanks so much @samth !

… which should be called transpose
:slightly_smiling_face:

or use a matrix / 2d array data structure

lex works well by itself, but plugging it into apply-tokenizer-maker, there’s an error:
position-token-token: contract violation expected: position-token? given: #<eof>
If I understand it correctly, the lexer goes through the text until it returns eof, and then apply-tokenizer-maker is supposed to quit, but position-token-token, in the middle, can’t handle eof. Correct?

BTW, what’s position-token-token
? When I try to find documentation for it, I just find position-token
.

I guess I should wrap something around (lex/src in)
to remove eof?

@saronson has joined the channel

There’s in-values-sequence
!

@laurent.orseau in-generator
doesn’t quite work since I also really need this thing as a generator in some context

Also, it’s true that if I am at the generator side, I can yield lists instead. But I might not have a control over the generator.

While trying to understand continuations, I ended up building some simple control flow structures with them in order to teach myself how to use them. I wrote them up in a gist for anyone interested: https://gist.github.com/jackfirth/027411d567385dadb3202bee75a847b4

Advice greatly welcomed!

Is there a better way to produce a sequence of multiple values that is easier than using in-generator
? I tried really hard to read the documentation of make-do-sequence
but I eventually gave up every time…