Explorar o código

exercise 2.1: sqrt(1+x) function definition

George C. Privon %!s(int64=2) %!d(string=hai) anos
pai
achega
1554896762
Modificáronse 1 ficheiros con 7 adicións e 0 borrados
  1. 7 0
      02-basicfunctions/exercises/ex2.1.hs

+ 7 - 0
02-basicfunctions/exercises/ex2.1.hs

@@ -0,0 +1,7 @@
+-- Exercise 2.1
+-- George C. Privon
+-- 2023-09-05
+
+-- sqrt(1+x)
+sqrt1plus :: Double -> Double
+sqrt1plus x = sqrt $ 1 + x