rmap = \f x ys -> map (\y -> f x y) ys = \f x -> map (f x) = map . lmap = flip . rmap . flip outer = lmap . rmap -- \f xs ys -> map (\x -> map (f x) ys) xs
This is like splitting Outer Product into two applications of Rank in APL.
λ> (flip . (map .) . flip . (map .)) compare [1..3] [1..4] [[EQ,LT,LT,LT],[GT,EQ,LT,LT],[GT,GT,EQ,LT]]