Add the haskell book

This commit is contained in:
2025-12-09 16:32:32 +01:00
parent c95abc31d6
commit 3624c712d7
67 changed files with 1576 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
module Main where
import Prelude
import Control.Monad.Eff (Eff)
import Control.Monad.Eff.Console (CONSOLE, log)
import Math (pi)
--
-- 2.5 Comprehensive check
--
mulSquare :: Number -> Number
mulSquare x = pi * (x * x)
waxOn :: Int
waxOn = x * 5
where x = y * y
y = z + 8
z = 7
triple :: Int -> Int
triple x = x * 3
waxOff :: Int -> Int
waxOff = triple
main :: forall e. Eff (console :: CONSOLE | e) Unit
main = do
log "Hello sailor!"