3 ms·
A minor comment, but I’d reformat this a bit to make its structure clearer: fizzbuzz n = go id (show n) where go = test 3 "fizz" . test 5 "bu
by bradrn 4y ago
A minor comment, but I’d reformat this a bit to make its structure clearer:
fizzbuzz n = go id (show n)
where
go = test 3 "fizz" . test 5 "buzz"
test d s x =
if n `mod` d == 0
then const (s ++ x "")
else x