Selaa lähdekoodia

first haskell program

George C. Privon 2 vuotta sitten
vanhempi
commit
e8b3007dab
1 muutettua tiedostoa jossa 11 lisäystä ja 0 poistoa
  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