Though note that an even better type would probably be
twice : forall a,b,c. ((a->b)&(b->c)) -> a -> c
(e.g. in MLSub, the type for twice (fun x -> x::[]) 1
is the unsatisfying (rec a = (a list | int) list)
rather than the expected (int list) list
)