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
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!
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
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
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
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).
6 matches
Mail list logo