[Haskell] Help on Arrows
mai99dgf at studserv.uni-leipzig.de
Sat Jan 15 16:33:09 EST 2005
I would like to use Arrows, but I just can't figure out how to actually use them.
I looked at various documentations including the API doc , the Wiki , , and some random pages on the net but didn't find a single simple example that tells me how to apply an Arrow to a value.
Assume I have the extremly simple arrow such as:
> MyAdd1A :: (Arrow a, Num b) => a b b
> MyAdd1A = arr (\ x -> x + 1 )
I am probably totally wrong, buy I look for something like evaluateArrow with the type:
> evaluateArrow :: (Arrow a) => a b c -> b -> c
to use it like:
> main = do let x = evaluateArrow $ MyAdd1A 1
> print x
Please enlighten me!
---- Georg Martius, Tel: (+49 34297) 89434 ----
------- http://www.flexman.homeip.net ---------
More information about the Haskell