Thanks for the fast response.

"Instantiate the type of e with types t" in the documentation was crypt to
me.
The examples helped to clarify that if you have generic types A and B in a
type `(All (A B) A -> B)`, then the instantiate the type `(A -> B)` with
`(U Number False) Number)` means that `A` and `B` will be substituted by
`(U Number False)` and `Number` respectively.

That is cool!

Em seg, 24 de dez de 2018 às 13:46, Matthias Felleisen <
matth...@felleisen.org> escreveu:

>
> > #lang typed/racket
> >
> > (define-type MaybePB (U Positive-Byte False))
> >
> > (: f ( [Listof MaybePB] -> [Listof Positive-Byte]))
> > (define (f x)
> >   ((inst filter MaybePB Positive-Byte) number? x))
> >
> > (f '(1 #false))
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to