RE: fixed point

2003-10-31 Thread Harris, Andrew
Hi - I am trying to work out how the following function using "fix" is evaluated. I am hoping someone could look at my step-by-step breakdown of how I think evaluation works and see if I'm correct. My main question is how the order of operation (fixity?) is understood in going from step

RE: fixed point

2003-10-27 Thread Harris, Andrew
> > Notice that, (\x -> x) a reduces to a, so (\a b c -> a b c) x (y-z) z > reduces to x (y-z) z. You can therefore simplify your > function quite a > bit. > wierdFunc x y z = if y-z > z then x (y-z) z else (\d e -> d) (y-z) z > and you can still apply that lambda abstraction (beta-reduce) > wie

fixed point

2003-10-26 Thread Harris, Andrew
Hi - I am trying to do Exercise 9.9 in HSOE; and I've come up with an answer that works but I'm not sure if it answers the question properly. The problem is: The Question: - Suppose we define a function "fix" as: fix f = f (fix f) Suppose further we have a recursive functi

RE: question about parsing integers and floats with Parsec

2002-08-15 Thread Harris, Andrew
; return (Left f) } ) -andrew > -Original Message- > From: Harris, Andrew [mailto:[EMAIL PROTECTED]] > Sent: Thursday, August 15, 2002 6:55 PM > To: '[EMAIL PROTECTED]' > Subject: question about parsing integers and floats with Parsec > >

question about parsing integers and floats with Parsec

2002-08-15 Thread Harris, Andrew
Hi - This isn't a pure "Haskell" question, but I'm trying to use the Parsec library to parse out space separated numbers, which could be integers or floats and either positive or negative. I was using the "naturalOrFloat" lexeme parser from the ParsecToken module, until I realized that i