摘要:
其实flodLeft和foldRight就是折叠操作,我让们看下下列的函数折叠操作defsum(xs:List[Int]):Int = (0/:xs)(_+_)defproduct(xs:List[Int]):Int=(1/:xs)(_*_) (fruit.head/:fruit.tail)(_+"... 阅读全文
posted @ 2015-08-26 22:44
晴月sama
阅读(300)
评论(0)
推荐(0)
浙公网安备 33010602011771号