On 22 April 2011 21:26, Henning Thielemann <[email protected]>wrote:
> In idiomatic Haskell you would write > > case userList of > Nothing -> Nothing > Just plainUserList = > let user = findUser "bob" plainUserList > ... > > since (userList /= Nothing) requires an Eq instance without need and it > requires fromJust. Or was there an educational purpose to write it with (/= > Nothing) ? > Educational; it was just to make it look like and have similar meaning (as I perceived it) to the Fantom code. (I'd never write code like this; I use case analysis and avoid if.)
_______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
