2 ms·
You're not seriously asking for a definition of a basic everyday English word like monad, are you? (hmmm, Chrome underlines this word in this edit box for some
by logicallee 12y ago
You're not seriously asking for a definition of a basic everyday English word like monad, are you? (hmmm, Chrome underlines this word in this edit box for some reason - probably some political thing since C++, Go, and Python - Google's go-to languages - don't support this extremely mundane and everyday feature.)
Anyway it's like the word 'if' or 'except'. You just need to know about the syntax or any rules. Type "define monad" into Google if you don't know this super-basic word. (Personally, I would have thought most of us learned it when we were 3 or 4 and learning the numbers or the alphabet song). Anyway watch:
http://google.com/search?q=define%20monad http://google.com/search?q=define%20monad
it clearly tells you,
>Monad: a single unit; the number one.
What could be simpler?
So we can simply understand the OP's definition:
> For any monad X, we can say that a function is monadic if it returns a value in the X Monad.
plainly:
> For any X that is equal to the number one, we can say that a function for it is equivalent to the number one if it returns a value that is the number one.
in other words, the definition of a monad is just a function that returns 1 in all cases. This definition is super-simple. I have no idea why you object.
here are some examples of monads written in C:
int raise_to_zero(int x){
return 1;
}
this is a monad to raise a number to 0. Here is another one:
int multiply_by_zero_and_add_one(int x){
return 1;
}
this is a monad for multiplying by zero and adding one.
yet another would be:
int divide_by_self(int x){
return 1;
}
You get the idea. Likewise there are monads for all sorts of times that you need a function to return one in all cases.
It's really not hard. There's nothing circular or unusual about the OP's definition. He's just using plain everyday words we've all known since second grade, in their usual meanings. I'm at a loss why you would have trouble with this.
NOTE: I'm certainly not an expert, so if I've left anything out, anyone should feel free to correct me!
(pssst - this might be the only way of getting anything out of these folks.)
- StavrosK 12y agoOh, sorry, I'm not a native English speaker, which confused things. This is the clearest explanation on monads I've seen yet. I am going to try to implement these in Python right away, I think something like "return 1" should do the trick. Version 2 will support different values of 1.