fork download
  1. f n = if x >= 0 then x else (-1) - x
  2. where x = 3 - n `mod` 8
  3.  
  4. main = do
  5. print $ map f [0..20]
  6.  
Success #stdin #stdout 0s 4704KB
stdin
Standard input is empty
stdout
[3,2,1,0,0,1,2,3,3,2,1,0,0,1,2,3,3,2,1,0,0]