On Tuesday 14 March 2006 20:58, you wrote:
On 3/14/06, Benjamin Franksen [EMAIL PROTECTED] wrote:
On Tuesday 14 March 2006 14:46, Pete Chown wrote:
Shannon -jj Behrens wrote:
Arrows looks like a replacement for monads. Are you saying
I should drop my use of the State monad? If so,
On Tuesday 14 March 2006 20:58, you wrote:
On 3/14/06, Benjamin Franksen [EMAIL PROTECTED] wrote:
On Tuesday 14 March 2006 14:46, Pete Chown wrote:
Shannon -jj Behrens wrote:
Arrows looks like a replacement for monads. Are you saying
I should drop my use of the State monad? If so,
Shannon -jj Behrens wrote:
o How important is it that I switch from using the State monad to using
arrows?
Your problem seems to be naturally soved by the State monad, therefore
you should use that.
o How important is it that I switch from using | or $ to using
arrows?
Unimportant.
Ok, with all the various opinions, I think I'll:
o Stick with the State monad.
o Switch from | to $ and teach readers how to read it, Think of 'f $
g $ x' as 'f of g of x' or 'f(g(x))'. From that point of view, it may
be helpful to read 'f $ g $ x' from right to left.
Unless there are any
Shannon -jj Behrens wrote:
I'm only using | as a replacement
for $ because I find it more readable to read left to right than right
to left.
You can see this in two different ways, I think. Imagine the following:
(+1) (*2) 3
This is not legal Haskell because it gets parsed as:
((+1) (*2))
On Tuesday 14 March 2006 14:46, Pete Chown wrote:
Shannon -jj Behrens wrote:
Arrows looks like a replacement for monads. Are you saying
I should drop my use of the State monad? If so, why? I like the
readability of the do syntax.
Okay, now it's my turn to ask a question. :-) I've read
On 3/14/06, Benjamin Franksen [EMAIL PROTECTED] wrote:
On Tuesday 14 March 2006 14:46, Pete Chown wrote:
Shannon -jj Behrens wrote:
Arrows looks like a replacement for monads. Are you saying
I should drop my use of the State monad? If so, why? I like the
readability of the do
Shannon -jj Behrens [EMAIL PROTECTED] writes:
o How important is it that I switch from using the State monad to
using arrows?
Not at all.
o How important is it that I switch from using | or $ to using
arrows?
Not at all.
(It seems that using arrows just to replace | or $ is like
Hi,
I disagree with most people on this, since I am in general principle
opposed to monads on the grounds that I don't understand them :)
o How important is it that I switch from using the State monad to using
arrows?
I don't understand either monads or arrows
o How important is it that I
On 3/12/06, Einar Karttunen ekarttun@cs.helsinki.fi wrote:
On 12.03 01:47, Shannon -jj Behrens wrote:
monad. Perhaps controversially, I've continued to use | in a bunch
of places that the monad didn't get rid of because I think it's more
readable, but I'm still open for argument on this
On 3/12/06, Lennart Augustsson [EMAIL PROTECTED] wrote:
Shannon -jj Behrens wrote:
lexString ('*':cs) = (classifyString *, cs)
lexString (c:cs) = (classifyString [c], cs)
The first line isn't needed, it does the same as the second line.
Good eye! You are correct.
Thanks,
-jj
On Mon, Mar 13, 2006 at 06:48:51PM -0800, Shannon -jj Behrens wrote:
consolidateOutput = output reverse concat
and so on.
Are you saying that can be used as a reversed version of $?
For the (-) instance of Arrow, () is simply reversed function
composition, () = flip (.).
Using Arrows
Hi,
Thanks to everyone who reviewed my code and submitted comments the
first time! I've updated the code and transitioned to using the State
monad. Perhaps controversially, I've continued to use | in a bunch
of places that the monad didn't get rid of because I think it's more
readable, but I'm
On 12.03 01:47, Shannon -jj Behrens wrote:
monad. Perhaps controversially, I've continued to use | in a bunch
of places that the monad didn't get rid of because I think it's more
readable, but I'm still open for argument on this topic. Using the
What about using () from Control.Arrow?
--
Shannon -jj Behrens wrote:
lexString ('*':cs) = (classifyString *, cs)
lexString (c:cs) = (classifyString [c], cs)
The first line isn't needed, it does the same as the second line.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
15 matches
Mail list logo