Experimenting with Haskell style pure function declarations in javascript