For loop in Haskell

Run Settings
LanguageHaskell
Language Version
Run Command
module Main (main) where for :: Applicative f => a -> (a -> Bool) -> (a -> a) -> (a -> f ()) -> f () for initial condition step body | condition initial = body initial *> for (step initial) condition step body | otherwise = pure () main :: IO () main = for 0 (< 10) (+ 1) $ \i -> print i
Editor Settings
Theme
Key bindings
Full width
Lines