
27 Jan
2004
27 Jan
'04
6:20 a.m.
I'm new to Haskell and can't find an example to solve a trivial problem. I have code like this: findBlank :: [] -> Int findBlank str = findIndex (==' ') str But interpreter complains elsewhere of mismatch of Int with Maybe Int. I want to handle the maybe only here and nowhere else. This just makes matters worse: findBlank str = Just findIndex (==' ') str Thanks. Powered by the E-mail PIM - Info Select - www.miclog.com