[Haskell-cafe] Error: Improperly terminated character constant

Ivan Amarquaye amarquaye.ivan at hotmail.com
Sun May 11 07:36:04 EDT 2008

I'm writing a function dRop to accept words ending in 'es' and drop the last two characters i.e. 'es'.eg. mangoes -> mongo but i keep on getting this error: "Improperly terminated character constant" after running this code which i have left below. Can i get any form of help from anyone in here...?
dRop :: String -> String
dRop word = if  drop (length word - 2) word == 'es'
                     then take (length word - 2) word
                     else word
Connect to the next generation of MSN Messenger 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20080511/72a0b308/attachment.htm

More information about the Haskell-Cafe mailing list