On Thu, Jan 5, 2017 at 3:28 PM, Matthew Eric Bassett <[email protected]> wrote: > > the type signatures of this functions are: > (-> (Setof e) (Setof e) * (Setof e)) > > > (define list0 > (list (set 2) (set 3 2))) > (apply set-union list0) > > > (define list2 : (Listof (Setof Positive-Byte)) > (list (set 2) (set 3 2))) > (apply set-union list2) > > Why does the former work and the latter fail ? >
because, `list0` has a type `(List (Setof Positive-Byte) (Setof Positive-Byte))` which is guaranteed to hold at least one set value. `list2` may be `null`. So you get it. `set-union` requires at least one set value as input. -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.

