
24 Feb
2015
24 Feb
'15
9:28 a.m.
Roman Cheplyaka wrote:
Say I have
parse :: String -> Maybe Value process :: Value -> IO ()
Then (process . fromJust . parse) is the fastest way to compose the two.
Wouldn't process fromMaybe defaultValue . parse do as well?
So I'm -1 on dropping fromJust, but I don't object to adding a deprecation warning to it.
<snip>
Then again, why aren't we doing the same to head&tail?
I'd be very much in favour of that and would also add init and last. However, these are pretty easy to avoid with a custom prelude and the NoImplicitPrelude pragma. Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/