foldl

Run Settings
LanguageHaskell
Language Version
Run Command
fromDigits :: [Int] -> Integer fromDigits ds = foldl (\s d -> if d < 10 then s*10 + (fromIntegral d) else error "greater than 10") 0 ds main = print $ fromDigits [1,2,3,4,5]
Editor Settings
Theme
Key bindings
Full width
Lines