Browse Source

Create a simple function to compute a power

DricomDragon 5 năm trước cách đây
mục cha
commit
111e3c85f2
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  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)