I hereby claim:
- I am artisin on github.
- I am artisin (https://keybase.io/artisin) on keybase.
- I have a public key whose fingerprint is F120 4AB0 1E07 4C0B 470C 631B 84EC DBCA 1509 0620
To claim this, I am signing this object:
| <?php | |
| $fontTypes = array('woff2', 'woff', 'ttf', 'svg', 'eot'); | |
| $gFontURL = 'http://fonts.googleapis.com/css?family='; | |
| $uaFonts = array( | |
| 'woff2' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36', | |
| 'woff' => 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0; Trident/4.0; GTB7.4; InfoPath.3; SV1; .NET CLR 3.1.76908; WOW64; en-US)', | |
| 'ttf' => 'Mozilla/5.0 (Linux; U; Android 2.2.1; en-ca; LG-P505R Build/FRG83) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1', | |
| 'svg' => 'Mozilla/5.0(iPad; U; CPU iPhone OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B314 Safari/531.21.10', |
| { | |
| "name": "module-name", | |
| "version": "0.0.1", | |
| "description": "An example module to illustrate the usage of a package.json", | |
| "author": "Your Name <you.name@example.org>", | |
| "license": "MIT", | |
| "contributors": [{ | |
| "name": "Foo Bar", | |
| "email": "foo.bar@example.com" | |
| }], |
I hereby claim:
To claim this, I am signing this object:
| <snippet> | |
| <content><![CDATA[ | |
| <div class="codemirror-fixture" data-example="${1:name}"></div>]]></content> | |
| <tabTrigger>-fx</tabTrigger> | |
| <scope>text.html.markdown.multimarkdown, text.html.markdown</scope> | |
| <description>data-example</description> | |
| </snippet> | |
| <snippet> |
| // Lost Grid v5.1.6 - https://github.com/corysimmons/lost | |
| $gutter = 30px | |
| $rtl = false | |
| $flexbox = true | |
| /** | |
| * Sets a translucent background color to all elements it affects. Helpful while setting up, or debugging, the structure of your site to make sure all items are cleared correctly. | |
| * |
Function: a bunch of code you can call. It can take any number of parameters, and it can have a name.
Closure: The context, or variables and their values around the function when it was defined.
Generator: a special function that can yield more than one result when called in a loop. Generator functions also have closures.
So to shortly answer to your question: functions can't do anything a generator cannot do; or, generators can do more. And they all have closures.
Here's a simple example to understand closures:
var safeHead = function(xs) {
return S.ifElse(() => R.isNil(xs[0]), S.Nothing, S.Just, xs[0]);
};
const streetName = S.pipe([R.prop('addresses'), safeHead, R.map(R.prop('street'))]);
streetName({
addresses: []
});