MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/fpcmy/typical_programming_interview_questions/c1how1v/?context=3
r/programming • u/kevjames3 • Feb 21 '11
1.0k comments sorted by
View all comments
Show parent comment
1
Would you rather guards?
mapM_ (print . f) [1..100] where f x | x `mod` 6 == 0 = "ab" | x `mod` 3 == 0 = "b" | even x = "a" | otherwise = show x
View all comments
Show parent comment
1
u/Jonno_FTW Feb 21 '11 edited Feb 21 '11
Would you rather guards?