首页 > 代码库 > scala foldLeft foldRight 简写

scala foldLeft foldRight 简写

http://blog.csdn.net/oopsoom/article/details/23447317

  1. def /:[B](z: B)(op: (B, A) => B): B = foldLeft(z)(op)  
  2.   
  3. def :\[B](z: B)(op: (A, B) => B): B = foldRight(z)(op)  

scala foldLeft foldRight 简写