Overengineering

replies 27 February 2008 | 0 Comments

Douglas, you’re not alone. import Data.List (sortBy) import Data.Function (on) import Data.Maybe (mapMaybe) import Control.Monad.Instances   gizzabuzz pairs combiner = zipWith ($) (cycle funcs) [1..] where sortedPairs = sortBy (compare `on` fst) pairs funcs = map (\n -> display $ mapMaybe (filterOut n) sortedPairs) [1..foldr1 lcm $ map fst $ sortedPairs] display [] = show [...]

Tagged in , , , , ,