es

pipeline-operator

https://github.com/tc39/proposal-pipeline-operator/wiki

  1. let result = exclaim(capitalize(doubleSay("hello")));
  2. result //=> "Hello, hello!"
  3. let result = "hello"
  4. |> doubleSay
  5. |> capitalize
  6. |> exclaim;
  7. result //=> "Hello, hello!"

管道操作语法。目前处于 stage-1
https://github.com/tc39/proposals/blob/master/stage-1-proposals.md

FP

function first,data last

数据作为最后一个参数,有利于实现Lazy流程,即不传入数据前,对函数的执行都是对过程的描述。

combinator

组合子
由 Primitives 和 Combinators 组合起来的计算结构。

计算结构,在我看来,属于算法的特殊写法。同一个算法,有很多不同的编写方式。有一些性能好,有一些代码量少,有一些直观易读;而有一些可组合性好,可推理性高,它们可以呈现出有层次的计算过程。

Primitives 可以互相表示对方,而转化的过程则通过 combinator,通过这样的属性,很多时候可以将 Primitives 类比初始状态与衍生状态。
https://zhuanlan.zhihu.com/p/73394292
haskell相关:
https://zhuanlan.zhihu.com/p/25867784