On Fri, 2011-04-22 at 22:11 +0200, Henning Thielemann wrote:
> On Fri, 22 Apr 2011, Maciej Marcin Piechotka wrote:
> 
> > On Fri, 2011-04-22 at 21:26 +0200, Henning Thielemann 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) ?
> >
> > Using 'more advanced haskell'
> >
> > email = getEmail =<< findUser "bob" =<< userList
> 
> This is what Christopher Done wrote some lines below the code, that I 
> quoted.

Ups. Sorry - I didn't have all the context.

Regards

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to