[Haskell-cafe] Re: Simple Fudgets-question
henrikbe at ifi.uio.no
Mon Jan 26 23:31:27 EST 2004
Thomas Hallgren <hallgren at cse.ogi.edu> writes:
> Henrik Berg wrote:
>>I can't find any function in the Fudgets-library to do this:
>>(F a b) -> (F a (a, b))
>>... All I want to do is to resend the input out on the output.
> If that is all you want, this combinator is the right choice:
> throughF :: F a b -> F a (Either b a)
Yes, but (Either b a) won't give me the input _together_ with the
output, will it? I need a fudget that accepts some input, does some
work on it, and outputs the result _and_ the original input for
further processing by other fudgets. As far as I can see, this means
I need a tupple (a, b), and not the disjoint sum (Either a b).
More information about the Haskell-Cafe