Hi David,
I was referring to the `f' in the `runAuto' function, not the `liftAu' function.
-db
On Wed, Oct 19, 2011 at 8:53 PM, David Barbour dmbarb...@gmail.com wrote:
On Wed, Oct 19, 2011 at 8:07 PM, Captain Freako capn.fre...@gmail.com
wrote:
One more question on the `runAuto' code,
On Thu, Oct 20, 2011 at 5:19 AM, Captain Freako capn.fre...@gmail.comwrote:
Hi David,
I was referring to the `f' in the `runAuto' function, not the `liftAu'
function.
-db
Ah, I see. You quoted one thing and spoke of another, and I got all
confused. Keep in mind that functions are arrows
On 21/10/2011 3:00 AM, David Barbour wrote:
the f in (Automaton f) is a pure funtion runAuto is deconstructing the
arrow by pattern matching then applying the function to the input to
obtain the result and the continuation.
i.e. runAuto takes an arrow and applies it to a value.
On Thu, Oct
John Lask wrote:
This is literate code. It expounds on your initial question and provides
two solutions based either on the StateArrow or Automaton
(Remainder omitted.)
John,
Thanks so much for your help!
I'm going to study your example code and try to understand how the
Automaton implicit
On 20/10/2011 5:11 AM, Captain Freako wrote:
for your use case then, the StateArrow seems more appropriate as it
provides you with the final state. Ofcourse the Automaton arrow could
also be used:
liftAu' f s0 = proc x - do
rec (y,s') - arr f - (x,s)
s - delay s0 - s'
Thanks, John. I think I understand what you've done, below.
However, it's made me realize that I don't understand something about
your original code:
When the `liftAu' function was only returning `y', how were we able to
get `(y, a)' out of it, when we called it from `runAuto'?
Thanks,
-db
On
One more question on the `runAuto' code, John:
If I understand the code correctly, `f' is an arrow. Yet, we're using
it on the right side of `=' in a simple assignment. How are we getting
away with that?
Thanks,
-db
On Wed, Oct 19, 2011 at 3:02 PM, John Lask jvl...@hotmail.com wrote:
On
On Wed, Oct 19, 2011 at 8:07 PM, Captain Freako capn.fre...@gmail.comwrote:
One more question on the `runAuto' code, John:
If I understand the code correctly, `f' is an arrow. Yet, we're using
it on the right side of `=' in a simple assignment. How are we getting
away with that?
Thanks,
Hi John,
Thanks for this reply:
Date: Tue, 18 Oct 2011 14:05:22 +1030
From: John Lask jvl...@hotmail.com
Subject: Re: [Haskell-cafe] How to implement a digital filter, using
Arrows?
To: haskell-cafe@haskell.org
Message-ID: BLU0-
smtp384394452fd2750fbe3bcfcc6...@phx.gbl
Content-Type
. Which I think is what you want anyways!
-- ryan
On Tue, Oct 18, 2011 at 2:35 PM, Captain Freako capn.fre...@gmail.comwrote:
Hi John,
Thanks for this reply:
Date: Tue, 18 Oct 2011 14:05:22 +1030
From: John Lask jvl...@hotmail.com
Subject: Re: [Haskell-cafe] How to implement a digital
{-# LANGUAGE Arrows #-}
This is literate code. It expounds on your initial question and provides
two solutions based either on the StateArrow or Automaton
module Test where
import Data.List ( mapAccumL )
import Control.Arrow
import Control.Arrow.Operations
import
Hi all,
If I have a pure function, which maps `(input, initialState)' to `(output,
nextState)', what's the most succinct way of constructing a digital filter
from this function, using Arrows?
Thanks,
-db
___
Haskell-Cafe mailing list
your function corresponds with Control.Arrow.Transformer.Automaton. If
you frame your function is such most of your plumbing is taken care of.
http://hackage.haskell.org/packages/archive/arrows/0.4.1.2/doc/html/Control-Arrow-Transformer-Automaton.html
On 18/10/2011 1:46 PM, Captain Freako
13 matches
Mail list logo