readln >upper print(.) etc. in one-liners. It's well-used with the ((->) r) monad,
*L> ((,) =<< length) "lol"
(3,"lol")
*L> (,) (length "lol") "lol"
(3,"lol")
*L> ((,) <*> length) "lol" --also, lol
("lol",3)
(\f (a,b) -> (f a,f b))? or (\(a,b) -> [a,b])? or am i better off just using div and mod separately instead of divMod?
join (***) :: (Arrow a) => a b c -> a (b, b) (c, c)join (***) :: (b -> c) -> (b, b) -> (c, c)f (g . h $ div a b) (h $ mod a b)(\(x,y) -> f (g $ h x) (h y)) $ divMod a b
let (x, y) = divMod a b in f (g . h $ x) (h y)uncurry (\x y -> f (g . h $ x) (h y)) $ divMod a buncurry f . (g . h *** h) $ divMod a buncurry f . ((***) =<< (g .) $ h) $ divMod a bliftA2 f (h . g . fst) (h . snd) $ divMod a buncurry ((. h) . f . g . h) $ divMod a b
(g . h *** h) would be ((h >>> g) *** h) or (h *** h >>> first g) or (join (***) h >>> first g).