[Haskell-beginners] truncate results depend on strict/lazy

Mihai Maruseac mihai.maruseac at gmail.com
Mon Sep 9 20:15:57 CEST 2013


On Mon, Sep 9, 2013 at 1:59 PM, Bryan Vicknair <bryanvick at gmail.com> wrote:
> That would work for the specific input of "0.xyz", but in general, the input
> string may encode a float with an arbitrary number of digits on both sides of
> the decimal.


So, you'd need to convert 10.34 to 1034? I'd start with span (/= '.')
"10.32" and go from there :) (span from Data.Char)

-- 
MM
"All we have to decide is what we do with the time that is given to us"




More information about the Beginners mailing list