[racket] typed/racket request for type for 'fourth'

From: John Clements (clements at brinckerhoff.org)
Date: Tue Dec 13 14:28:42 EST 2011

Currently, in typed/racket, if I have a value of type  (List Number Number Symbol String), and I apply 'fourth' to it, I get (U Number Symbol String) rather than String.[*]

It looks to me like this is a "didn't get around to it yet" issue, but perhaps I'm missing some vital difference between 'cadddr' and 'fourth'. 

> fourth
- : (All (a) ((Listof a) -> a))
#<procedure:fourth>
> cadddr
- : (All (a b c d e) (case-> ((Pairof a (Pairof b (Pairof c (Pairof d e)))) -> d : ((! False @ (car cdr cdr cdr) 0) | (False @ (car cdr cdr cdr) 0)) (car cdr cdr cdr 0)) ((Listof a) -> a)))
#<procedure:cadddr>
> 

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.

No?

John



[*] My actual example uses another type Achievement rather than String; I'm hoping that's not related here.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4624 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20111213/3a01da6e/attachment.p7s>

Posted on the users mailing list.