[Haskell-cafe] howto catamorph monoid (was Re: Is there already an
abstraction for this?
Larry Evans
cppljevans at suddenlink.net
Sat Oct 18 18:28:16 EDT 2008
On 10/18/08 16:48, Larry Evans wrote:
[snip]
> I'm trying to apply this to a simple boolean simplifier
> shown in the attachment.
This attachment is the same as the previous except, instead
of a boolean algebra, an monoid is used.
[snip]
> The output
> of the last line of attachment is:
>
[snip]
mon_eval:1*1*v0=(:*) (Op0 (OpCon MonoidOne)) (Op0 (OpVar V0))
>
> however, what I want is a complete reduction to:
>
> (OpVar V0)
>
As in the previous line beginning with mon_eval:
mon_eval:1*v0=Op0 (OpVar V0)
> How can this be done using catamorphisms?
>
Same question w.r.t. this attachment.
TIA.
-Larry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: catamorphism.example.hs
Type: text/x-haskell
Size: 1725 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20081018/cd0465e8/catamorphism.example.bin
More information about the Haskell-Cafe
mailing list