Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shouldn't the law be more like: ƒ(ƒ(x)) ≡ ƒ(x) #1

Closed
seanparsons opened this issue Feb 28, 2014 · 2 comments
Closed

Shouldn't the law be more like: ƒ(ƒ(x)) ≡ ƒ(x) #1

seanparsons opened this issue Feb 28, 2014 · 2 comments

Comments

@seanparsons
Copy link

The law doesn't quite seem right to me, surely it should be:
a mappend b mappend b == a mappend b
Potentially as well as:
a mappend a == a

@prophile
Copy link
Owner

The latter (the current version of the law) is the usual definition of idempotence for a binary operation, as opposed to the usual unary operation definition given in the title of this issue.

The former law, as you state it, is a logical consequence of the latter law (and, potentially, the monoid associativity law depending on how mappend associates).

@seanparsons
Copy link
Author

Works for me, I need to remember that monoid append is a binary operation like that, rather than thinking of it as the function "mappend a".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants