Browse Source

first haskell program

George C. Privon 2 năm trước cách đây
mục cha
commit
e8b3007dab
1 tập tin đã thay đổi với 11 bổ sung0 xóa
  1. 11 0
      02-basicfunctions/01-first.hs

+ 11 - 0
02-basicfunctions/01-first.hs

@@ -0,0 +1,11 @@
+-- First Haskell program
+-- George C. Privon
+-- 2023-09-04
+
+-- Define a constant
+e :: Double
+e = exp 1
+
+-- Define a function
+square :: Double -> Double
+square x = x ^ 2