浏览代码

Create a simple function to compute a power

DricomDragon 5 年之前
父节点
当前提交
111e3c85f2
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      mypower.hs

+ 3 - 0
mypower.hs

@@ -0,0 +1,3 @@
+e1 x n = case n of
+	0 -> 1
+	_ -> x * e1 x (n - 1)