[Haskell-beginners] Parser composition

Angelos Bimpoudis ampimpou at otenet.gr
Thu Dec 2 23:50:16 CET 2010


Hi all, 

 

This is my first post to this list. Nice to meet you!

 

I study Functional Programming with Haskell, and I have stuck at p.77 (the
first checkpoint in FP, as far as I understand). Passing this, I feel that I
make steps towards understanding monadic binding!

 

So I would like to ask about whether or not this:

P1>>=λu1 -> 

P2>>=λu2 ->

P3>>=λu3 ->

P4>>=λu4 ->

return (f u1 u2 u3 u4)

 

can be rewritten to:

P1>>=(λu1 -> P2>>=(λu2 -> P3>>=(λu3 -> P4>>=(λu4 -> return (f u1 u2 u3
u4)))))

 

I am trying to understand what is the f in p>>=f in each one of above
sequencing applications?

 

So >>= gets you in this structure (is this the monad?), and return is the
gate out of it?

 

Best regards.

These are my first steps to FP!

 

--

Angelos Bimpoudis

Doctoral Researcher, Pervasive Computing [p-comp.di.uoa.gr] 

SDE, Nessos IT S.A. [www.nessos.gr]

(m): +306942075153

 <http://gr.linkedin.com/in/aggelosmp> Description: Description: Linkedin
<http://www.facebook.com/aggelosmp> Description: Description: Facebook
<http://www.studentguru.gr/blogs/grnemo/> Description: Description: Blog RSS
<http://twitter.com/aggelosmp> Description: Description: Twitter

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20101203/1c0e5b50/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 655 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/beginners/attachments/20101203/1c0e5b50/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 258 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/beginners/attachments/20101203/1c0e5b50/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 691 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/beginners/attachments/20101203/1c0e5b50/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 570 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/beginners/attachments/20101203/1c0e5b50/attachment-0003.png>


More information about the Beginners mailing list