fork(3) download
  1. main = print $ iter 2 half $ Just 127
  2.  
  3. iter c f
  4. |c > 0 = iter (c-1) f.f
  5. |True = id
  6.  
  7.  
  8. half (Just a)
  9. |mod a 2 == 0 = return (div a 2)
  10. |True = Nothing
  11. half _ = Nothing
  12.  
Success #stdin #stdout 0s 6272KB
stdin
Standard input is empty
stdout
Nothing