Explorar o código

first haskell program

George C. Privon %!s(int64=2) %!d(string=hai) anos
pai
achega
e8b3007dab
Modificáronse 1 ficheiros con 11 adicións e 0 borrados
  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