[racket] typed/racket request for type for 'fourth' [and 1 more messages]

From: Eli Barzilay (eli at barzilay.org)
Date: Tue Dec 13 14:47:49 EST 2011

10 minutes ago, John Clements wrote:
> I know that there are some differences between the 'fourth' family
> and the 'cadddr' family w.r.t. the kinds of arguments that they
> accept, but it seems to me that if I have a (List Number Number
> Symbol String), for instance, that I should be able to use 'fourth'
> to get a String.

There's a point for `first', `second', etc to do the same as `fourth'
does in the above because the underlying functions require a list.
But there's a counter point of having a (List ...) type in the first
place.  So maybe `List' should also be limited to match what `fourth'
is doing?  (IOW, the above `List' would be invalid, but if `fourth' is
made to work as John expects then it would be valid...?)


Just now, Sam Tobin-Hochstadt wrote:
> 
> Your initial impression is correct, I'll extend this support for
> `second', `third', etc.

It's `fourth' and above, I think.

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!


Posted on the users mailing list.