作者 Anonymous [actionscript] 2012-01-14 10:54 (点击下载)

  1. -- Inspired by SICP
  2.  
  3. fac1 1 = 1
  4. fac1 n = n * fac1 (n - 1)
  5.  
  6. fac2 n = fac_iter 1 1
  7. where
  8. fac_iter pro cnt
  9. | cnt > n = pro
  10. | otherwise = fac_iter (cnt * pro) (cnt + 1)
  11.  

提交下面的校正或者修改. (点击这里开始一个新的帖子)
姓名: 在 cookie 中记住我的名字

屏幕抓图:(jpeg 或 png)