- http://jhusain.github.io/learnrx/
- http://www.tomdalling.com/blog/software-design/fizzbuzz-in-too-much-detail/
- http://phuu.net/2014/08/31/csp-and-transducers.html
- https://medium.com/@yelouafi/from-callback-to-future-functor-monad-6c86d9c16cb5
- https://medium.com/@yelouafi/javascript-and-type-thinking-735edddc388d
- https://medium.com/@yelouafi/promises-fp-beautiful-streams-6f0235c5b179
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew update && \ | |
brew install nvm && \ | |
echo "source $(brew --prefix nvm)/nvm.sh" >> ~/.profile && \ | |
source ~/.profile && \ | |
nvm install iojs && \ | |
nvm alias default iojs && \ | |
npm install -g npm@latest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function.prototype.curried = function (f=this) { | |
return (...args) => args.length < f.length | |
? f.curried(args.reduce((g, arg) => g.bind(null, arg), f)) | |
: f.apply(null, args); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.firebase.client; | |
import com.firebase.client.core.view.Event; | |
import rx.Observable; | |
import rx.Subscriber; | |
import rx.functions.Action0; | |
import rx.functions.Func1; | |
import rx.subscriptions.Subscriptions; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const range = ({start=0, end=1})=> [...Array(end - start + 1)].map((_, i) => start + i); | |
const fizzbuzz = (num=100) => [for (x of range({end: num})) (!(x%3)?"Fizz":'')+(!(x%5)?'Buzz':'')] | |
console.log(fizzbuzz(30)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function* fibonacci() { | |
let a = 0, b = 1; | |
while(a < Infinity) { | |
yield a; | |
[a, b] = [b, a + b]; | |
} | |
} | |
for(let value of fibonacci()) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const qsort = ([first, ...rest]) => | |
first === undefined | |
? [] | |
: [ | |
...qsort([for (x of rest) if (x < first) x]), | |
first, | |
...qsort([for (x of rest) if (x >= first) x]) | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const combine = (...arrays) | |
=> [].concat(...arrays); | |
const compact = arr | |
=> arr.filter(el => el); | |
const contains = (() => Array.prototype.includes | |
? (arr, value) => arr.includes(value) | |
: (arr, value) => arr.some(el => el === value) | |
)(); |
I hereby claim:
- I am cem2ran on github.
- I am cem2ran (https://keybase.io/cem2ran) on keybase.
- I have a public key whose fingerprint is 9D5C F0AF 85B1 F58D 5D3F 5B34 0B5E 30A7 DA01 F730
To claim this, I am signing this object: