DEV Community

Discussion on: Daily Challenge #47 - Alphabets

Collapse
 
curtisfenner profile image
Curtis Fenner

You don't need your filter isAlpha and isAlpha functions, since toNumber already returns None when the character isn't a letter, which chops off a nice bit of the solution!

You can also use findIndex from Data.List instead of find-with-zip (though that solution is cool! 😋

toNumber = (fmap (+1)) . (flip findIndex alpha) . (==)