>>> YieldNull
  • /blog
  • /archives
  • /github
  • /about

Entries tagged with FP

  • FoldLeft Via FoldRight

    2017-07-22 12:26:43 / FP Scala /4549 hits

    怎么用FoldRight实现FoldLeft呢?两个函数的签名如下

    def foldLeft[A,B]: (List[A], B) => ((B, A) => B) => B
    
    def foldRight[A,B]: (List[A], B) => ((A, B) => B) => B
    

    Read more...


  • « Previous
  • Next »

About this site © YieldNull,