[Haskell-cafe] Trying to write 'safeFromInteger'

david48 dav.vire+haskell at gmail.com
Wed Apr 8 12:26:49 EDT 2009


On Wed, Apr 8, 2009 at 2:55 PM, Neil Mitchell <ndmitchell at gmail.com> wrote:

> That seems a really weird way to write it! Who decided all auxiliary
> functions should be called go? (I think I'm blaming dons) - why not:
>
> sffi :: (Integral a,Num a) => Integer -> Maybe a
> sffi n | toInteger n2 == n = Just n2
>        | otherwise = Nothing
>     where n2 = fromInteger n


I know I was too lazy to clean it up :-P
( I also blame Dons for 'go' )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090408/a56b08f9/attachment.htm


More information about the Haskell-Cafe mailing list