[racket-dev] `take' argument order

2011-06-07 Thread Eli Barzilay
While trying to finally get `take-while' etc, I realized that the problem with the `take' (and `drop' and related) argument order is even more thorny. The existing problem is that `take' in lazy takes the number first and then the list -- not a big problem by itself, but: * Contradicts Haskell's

[racket-dev] `take-until' etc

2011-06-07 Thread Eli Barzilay
Does anyone see a need for `take-until' (and `drop-' and `-right' versions), or is `negate' enough to not have that? -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://barzilay.org/ Maze is Life!

Re: [racket-dev] `take-until' etc

2011-06-07 Thread Jay McCarthy
I've used them before and I find they read better than using negate. 2011/6/7 Eli Barzilay e...@barzilay.org: Does anyone see a need for `take-until' (and `drop-' and `-right' versions), or is `negate' enough to not have that? --          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli

Re: [racket-dev] typed/racket for loops?

2011-06-07 Thread Sam Tobin-Hochstadt
No annotations are needed here, even: #lang typed/racket (: p (Listof Integer)) (define p (for/list ([i (in-range 30)]) i)) The other problem is why doesn't it know that `in-range' produces Naturals; I'll look into that. On Tue, Jun 7, 2011 at 12:24 PM, Hari Prashanth krh...@ccs.neu.edu

Re: [racket-dev] more general typed/scheme bafflement...

2011-06-07 Thread John Clements
On Jun 7, 2011, at 4:26 PM, Carl Eastlund wrote: John, You had an easy time with + because it is monomorphic. You are having trouble applying one polymorphic function (map) to another (list or list2). Instantiate one or both functions explicitly, and Typed Racket won't get confused by

Re: [racket-dev] more general typed/scheme bafflement...

2011-06-07 Thread Sam Tobin-Hochstadt
On Tue, Jun 7, 2011 at 4:57 PM, John Clements cleme...@brinckerhoff.org wrote: On Jun 7, 2011, at 4:26 PM, Carl Eastlund wrote: John, You had an easy time with + because it is monomorphic.  You are having trouble applying one polymorphic function (map) to another (list or list2).