-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
What is ∀? #12
Comments
It usually means for all. A backwards 'E' means for some or there exists. /*
elements: a set (Array) of things
predicate: a function that takes one or more things from elements and returns true or false
*/
function forAll (elements, predicate) {
return elements.every(predicate);
}
//And for backwards 'E' (existence)
function forSome (elements, predicate) {
return elements.some(predicate);
} It's nice that we can simply use functions already provided by JS! (Although it might be easier to do others in Haskell 😎) Any other specific ones you want explained? |
You should pull-request this so it's included in the main list. |
Programmers will generally think of the existential quantifier ∃ Because JavaScript is required by law to get nothing right ever, JavaScript calls this var isOdd = function(X) { return (x%2); },
Example = [2,4,6,7];
window.alert(Example.some(isOdd)); |
Working on a PR now... plan to push in the next few days. I hope to include Set notation/theory as well. @daveloyall I saw some statistical distribution notation in that article you shared. Would you like that explained as well? |
@LOZORD sure, though I don't suggest prioritizing it on my behalf. That paper was just something I had on my screen at the moment I discovered this math-as-code project. ...There was some other paper that I care more about, I'll try to find it. Something like "Category Theory for Computer Scientists". Using this project, perhaps we can turn that paper into "Category Theory for Industry Programmers". :) |
|
...And other symbols found in http://enigma.media.mit.edu/enigma_full.pdf ?
The text was updated successfully, but these errors were encountered: