[Haskell-cafe] Re: questions about Arrows

2010-09-01 Thread Maciej Piechotka
On Tue, 2010-08-31 at 20:39 -0700, Ben wrote: Hello -- Three related questions, going from most specific to most general : 1 ) Consider the stream processing arrow which computes a running sum, with two implementations : first using generic ArrowCircuits (rSum); second using Automaton

Re: [Haskell-cafe] Re: questions about Arrows

2010-09-01 Thread Ben
Thanks for the prompt reply. Some questions / comments below : On Wed, Sep 1, 2010 at 12:33 AM, Maciej Piechotka uzytkown...@gmail.com wrote: rSum2 :: ArrowCircuit a = a Int Int rSum2 = proc x - do    rec out - delay 0 - out + x    returnA - out + x Wow, that was simple. I guess I never

Re: [Haskell-cafe] Re: questions about Arrows

2010-09-01 Thread Maciej Piechotka
On Wed, 2010-09-01 at 11:49 -0700, Ben wrote: Thanks for the prompt reply. Some questions / comments below : On Wed, Sep 1, 2010 at 12:33 AM, Maciej Piechotka uzytkown...@gmail.com wrote: rSum2 :: ArrowCircuit a = a Int Int rSum2 = proc x - do rec out - delay 0 - out + x