gusty / FsControl

[ARCHIVED] FsControl in now included in FSharpPlus https://fsprojects.github.io/FSharpPlus
Apache License 2.0
105 stars 16 forks source link

Wrong Monoid instance? #61

Closed gusty closed 8 years ago

gusty commented 8 years ago

The Monoid instance for ('T->'U) is currently defined as function composition. However in Haskell is defined as a function where 'U is a Monoid, so mappend is:

mappend f g x = f x `mappend` g x

The current definition is in fact the same as the one for Endo which is another reason to consider to change it.