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 20, 2011 at 5:19 AM, Captain Freako<capn.fre...@gmail.com>wrote:

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 (instance Arrow (->)).

type FilterAu b c = Automaton (->) b c
runAuto :: FilterAu b c ->  [b] ->  [c]
runAuto a             []     = []
runAuto (Automaton f) (x:xs) = let
   (y,a) = f x
   in y:runAuto a xs



_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to