Functional programming as native JS objects