Daniel,
New combinator (:) that you introduced helps a lot to understand the whole
thing. I think that your explanation should be included in the next edition
of the Haskell. The Craft of Functional Programming, I really mean it.
To summarize how I now understand the parser:
Using your
Daniel,
I am still trying to figure out the order of function applications in the
parser returning list of objects (I attached again the code to the end of
this message for convenience).
You wrote:
(*) associates to the right, hence
p * (p * (p * (... * (p * succeed [])...)))
I don't understand
Am Mittwoch, 28. März 2007 11:57 schrieb Dmitri O.Kondratiev:
Daniel,
I am still trying to figure out the order of function applications in the
parser returning list of objects (I attached again the code to the end of
this message for convenience).
You wrote:
(*) associates to the right,
Thanks Daniel!
Things are getting more in shape, yet I still can not fully comprehend the
expression:
((p * pList p) `build` (uncurry (:)))
where
(*) :: Parse a b - Parse a c - Parse a (b, c)
(*) p1 p2 inp = [((x,y), rem2) |(x, rem1) - p1 inp, (y, rem2) - p2
rem1]
build :: Parse a b - (b - c)
Am Dienstag, 27. März 2007 12:15 schrieb Dmitri O.Kondratiev:
Thanks Daniel!
Things are getting more in shape, yet I still can not fully comprehend the
expression:
((p * pList p) `build` (uncurry (:)))
where
(*) :: Parse a b - Parse a c - Parse a (b, c)
(*) p1 p2 inp = [((x,y), rem2)
-Ursprüngliche Nachricht-
Von: Dmitri O.Kondratiev [EMAIL PROTECTED]
Gesendet: 26.03.07 16:44:12
An: haskell-cafe@haskell.org
Betreff: [Haskell-cafe] Newbie: a parser for a list of objects?
Please see my questions inside comments {-- --} :
Thanks!
---
module Parser where