Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

It was great for a while

Name: Anonymous 2009-02-18 6:38

Please try to ignore troll posts.

http://userscripts.org/scripts/show/40415

Name: Anonymous 2009-02-19 21:35

>>36
That's not a bad way to do it. Here are a bunch of other ways using divMod (haven't checked them all, sorry):
let (x, y) = divMod a b in f (g . h $ x) (h y)
Let expressions are great for reducing unnecessary duplication.
uncurry (\x y -> f (g . h $ x) (h y)) $ divMod a b
uncurry f . (g . h *** h) $ divMod a b
uncurry f . ((***) =<< (g .) $ h) $ divMod a b
liftA2 f (h . g . fst) (h . snd) $ divMod a b
(or liftM2)
from pl:
uncurry ((. h) . f . g . h) $ divMod a b

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List