javascript - Is it difficult to understand the use of api in ramda?
滿天的星座
滿天的星座 2017-07-05 10:42:21
0
1
740

I’ve been looking at functional programming recently. The ramda library is used.

But the use of various APIs is confusing.

  var func3=_.compose(p,trace("f3:"), f);
  var func4=_.filter(_.compose(p,trace("f4:"), f));
  console.log(func3(3))//36
  console.log(func4([3]))//[3] why? what happened
滿天的星座
滿天的星座

reply all(1)
某草草

Ramda will be automatically curried, is it understandable?

_.filter(func3, [3])

func3(3) returns 36, which is true, so filter it again and 3 is still there

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template