
8 Aug
2011
8 Aug
'11
9:11 p.m.
On 9 August 2011 11:06, Paul Reiners
On Aug 8, 2011, at 7:59 PM, Ivan Lazar Miljenovic wrote:
On 9 August 2011 10:49, Paul Reiners
wrote: step acc x = acc * 10 + digitToInt x
digitToInt returns an Int; as such the result of asInt_foldAux is an Int, but you've specified in its type signature that it should be returning an Integer.
So is there something like digitToInteger? Or can I somehow cast the Int to an Integer?
step acc x = acc * 10 + fromIntegral (digitToInt x) -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com