On 24/09/11 05:21, Evan Laforge wrote:
hex2 = (+)<$>  ((*16)<$>  higit)<*>  higit
higit = subtract (fromEnum '0')<$>  satisfy isHexDigit
color = Color<$>  hex2<*>  hex2<*>  hex2

How is "subtract (fromEnum '0')" supposed to convert a hex digit to an Int or Word8? I think you need digitToInt (or an equivalent function) for that.


Twan

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to