Sfoglia il codice sorgente

first haskell program

George C. Privon 2 anni fa
parent
commit
e8b3007dab
1 ha cambiato i file con 11 aggiunte e 0 eliminazioni
  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