Skip to content

Instantly share code, notes, and snippets.

View the1sky's full-sized avatar

nant the1sky

View GitHub Profile
@the1sky
the1sky / node-path
Last active September 12, 2016 14:55
export PATH=$PATH:/data/work/node/bin
@the1sky
the1sky / react_redux_store
Created October 8, 2016 11:36
react redux store
Module.contextTypes = {store: React.PropTypes.object};
@the1sky
the1sky / Functor.js
Created June 13, 2017 17:32 — forked from CrossEye/Functor.js
First Functor Fantasy
(function(global) {
var types = function(obj) {
throw new TypeError("fmap called on unregistered type: " + obj);
};
// inefficient as hell, but as long as there aren't too many types....
global.Functor = function(type, defs) {
var oldTypes = types;
types = function(obj) {
if (type.prototype.isPrototypeOf(obj)) {