// PURE FUNCTIONS
/// For example, this is a pure function:
function add2 (x){
return x + 2
}
/// And this is not:
var y = 2
function adder (x){
return x + y
}
// CURRYING
///...
// FUNCTOR
/// if a data type has map function it's a functor
arr.map(x=>x*2) // etc
/// rule: given x=>x should not make any change
// MONAD