3

Reading the package's description, I see there are "extensions" on commonly used classes available in a separate file monet-pimp.js. For example, they suggest I write like this:

var f = function (x, y) { ... } .curry()

But I cannot understand how I am supposed to "activate" this feature. If I require the module:

monet = require("monet")

— I do not think any alteration to built in classes is to be expected. And I do not know if there is a way to require monet-pimp.js directly.

ulfryk
  • 683
  • 1
  • 6
  • 15
Ignat Insarov
  • 4,660
  • 18
  • 37

1 Answers1

0

the code is here; it's not exported;

https://github.com/monet/monet.js/blob/develop/src/monet-pimp.js

you can export it and use it like this..

...

export const activateMonadSugar = ()=> (function (root, factory) {
 ...
....


activateMonadSugar()



Archy Will He 何魏奇
  • 9,589
  • 4
  • 34
  • 50