Re: [racket-users] [newbie] Help with streams

2015-12-20 Thread Benjamin Greenman
I've been struggling with streams recently too. in-producer solved my problems. (define name-gen (in-producer (lambda () (new-name ethnicity sex (define some-names

Re: [racket-users] [newbie] Help with streams

2015-12-20 Thread Alexis King
My “collections” package makes fairly heavy use of streams, so it provides a number of utilities to help with what you want to do. The obvious function here would be `generate-sequence`[1], which creates a stream from a generator. You can call `take` on the resulting sequence, since my generic

[racket-users] [newbie] Help with streams

2015-12-20 Thread mark
Hi, there. I have just started playing with Racket and would like some help with using streams/generators (I am not particularly versed in programming in a functional style and am attempting to learn :-)) So I have a function called (new-name) that creates a random name, like "Bob Brown" or