Re: [racket-dev] Need a clarification on the implementation of stream-map

2012-07-10 Thread Jay McCarthy
And thus, the type of stream-map is NOT stream-map : (a - b) (stream a) - (stream b) but stream-map : (a b c ... - d e f ...) (stream a b c ...) - (stream d e f ...) Jay On Sun, Jul 8, 2012 at 8:00 AM, Robby Findler ro...@eecs.northwestern.edu wrote: I'm not sure about the rationale behind

Re: [racket-dev] Need a clarification on the implementation of stream-map

2012-07-10 Thread Daniel King
Sorry, I accidentally sent this off the mailing list and accidentally switched emails. Eli, I don't see any trace of multiple valued `stream's in racket/stream. Can you confirm or deny their existence? On Tue, Jul 10, 2012 at 11:13 PM, Jay McCarthy jay.mccar...@gmail.com wrote: Eli wrote

Re: [racket-dev] Need a clarification on the implementation of stream-map

2012-07-10 Thread Eli Barzilay
No, I didn't write `racket/stream' -- Matthew did it based on the stream srfi. This came up not too long ago, and I sent a question about it here: http://lists.racket-lang.org/dev/archive/2012-June/009612.html Since there were no replies, I meant to remove it but didn't get to it. I'll push it

Re: [racket-dev] Need a clarification on the implementation of stream-map

2012-07-09 Thread Matthias Felleisen
On Jul 8, 2012, at 7:25 AM, Daniel King wrote: (define (stream-map f s) (unless (procedure? f) (raise-argument-error 'stream-map procedure? f)) (unless (stream? s) (raise-argument-error 'stream-map stream? s)) On a related note, the above kind of checks should really become real

Re: [racket-dev] Need a clarification on the implementation of stream-map

2012-07-08 Thread Robby Findler
I'm not sure about the rationale behind the design of stream-map, but any as a result contract for a function indicates it may return multiple values (in the range of a function any is a special keyword). any/c is a contract for a single value. Robby On Sun, Jul 8, 2012 at 6:25 AM, Daniel King