Re: [racket] How to read procedure documentation?

2013-04-19 Thread Shannon Severance
On 4/19/13 2:27 PM, "Matthias Felleisen" wrote: > -- our contract system has a really hard time expressions g : ∀ t : t -> t. I'd like to double check my understanding. Is the SML type fn : 'a -> 'a the same as what you meant by g : ∀ t : t -> t? -- Shannon Racket User

Re: [racket] Why is this slow?

2013-04-24 Thread Shannon Severance
Jordan, I'm new to Racket, so I do not fully understand your implementation of the sieve-of-eratosthenes. So I can't comment one why it is slow. But I have a faster version, and maybe some differences will stand out to investigate. I did notice that your when your implementation of the sieve was

Re: [racket] Why is this slow?

2013-04-24 Thread Shannon Severance
This one I will need to study, since it uses new to me Racket stuff. And it is quick. On my machine: > (time (apply + (gb-sieve-of-eratosthenes n))) cpu time: 485 real time: 497 gc time: 118 142913828922 Compare: > (time (apply + (filter prime? (range 2 n cpu time: 9788 real time: 9974 gc tim

Re: [racket] Problem Stream with alternating values

2013-05-21 Thread Shannon Severance
Patrick, > I saw that. The requirement for a stream of alternating values was > clearly stated, but then it confusingly talked about the internal > structure of a stream. Surely if the stream is constructed by > stream primitives then it will all be thunked. Or do you read the > problem as requi