fork download
  1. check = foldr (\x prev -> if x `rem` 5 == 0 then x else prev) 0
  2.  
  3. main = do
  4. print $ check [1,2,3,4,5,10]
  5. print $ check [8,9,7,4,2,78]
Success #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
5
0