首页 文章
  • 6 votes
     answers
     views

    Haskell中的电源系列

    我正在尝试在Haskell中编写电源系列, e^x = 1 + x + x^2/2! + x^3/3! + ... 这样就可以了 [1,1,1/2,1/6,...] 到目前为止我得到了: factorial 0 = 1 factorial n = n * factorial (n - 1) powerSrs x = 1 : powerSrsFunc[1..] where p...

热门问题