Haskell

Structure of a main script with let and do syntax. Save in a script e.g. example.hs

1
2
3
4
5
6
7
8
9
main :: IO ()
main = do
  let
    printString = "Hi"
    number = 3
  putStrLn printString
  (putStrLn . show) number


To compile and run we use stack exec -- runghc example.hs