摘要: 在scala中如果一个函数在最后一步调用自己(必须完全调用自己,不能加其他额外运算子),那么在scala中会复用函数栈,这样递归调用就转化成了线性的调用,效率大大的提高。If a function calls itself as its last action, the function's sta... 阅读全文
posted @ 2014-10-18 20:01 yanghuahui 阅读(1668) 评论(0) 推荐(0)