I think I've written the most polymorphic non-toy two-line ML program ever.
val cross : (('a -> 'b -> 'c) -> 'd -> 'e -> 'f) ->
(('g -> 'h -> 'i) -> 'j -> 'b -> 'c) ->
('a -> 'g -> 'h -> 'i) ->
'e -> 'd -> 'j -> 'f
Here's the definition:
let cross outer inner f init xs ys
(
Read more... )