Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 7 lines (6 sloc) 0.211 kb
1 2 3 4 5 6 7
import Data.Char (digitToInt)

asInt :: String -> Int
asInt xs = loop 0 xs
    where loop acc (x:xs) = let acc' = acc * 10 + digitToInt x
                            in loop acc' xs
          loop acc [] = acc
Something went wrong with that request. Please try again.