News for hackers. Stuff that matters.
Re:Unpythonic Python by echaozh on Thursday April 10, 2014 @11:59PM (#7571156)
[concat $ replicate (fromEnum $ x `mod` 3 == 0) "Fizz" ++ replicate (fromEnum $ x `mod` 5 == 0) "Buzz" | x <- [1..101]]

or

let f = (replicate . fromEnum . (==0)) .: mod in [concat $ f x 3 "Fizz" ++ f x 5 "Buzz" | x <- [1..101]]

There are no comments on this comment yet.