On 21/02/2019 20:40, Zelphir Kaltstahl wrote:
Python, I believe, has some kind of `Iterable` interface, which a generator satisfies and which specifies the method to call to get the next value. In Racket maybe one would have to do with a convention of how to get a next value from a lazy list.

Python's concept of iterables is very similar to Racket's streams (https://docs.racket-lang.org/reference/streams.html) and sequences (https://docs.racket-lang.org/reference/sequences.html). And Python generators are very similar to Racket generators (https://docs.racket-lang.org/reference/Generators.html). The main difference, as has been pointed out before, is that Python generators are more common as an idiom for solving problems that in Racket would typically be approached differently.

Konrad.


--
You received this message because you are subscribed to the Google Groups "Racket 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to