Skip to content

Instantly share code, notes, and snippets.

View therewillbecode's full-sized avatar

Tom therewillbecode

  • Edinburgh, UK
View GitHub Profile
module Main where
import Lib
import Data.Char
import Data.Machine
-- newtype CurrPlayerToAct = CurrPlayerToAct String deriving (Eq, Show, Ord)
@therewillbecode
therewillbecode / blog_post.md
Last active August 29, 2023 20:44
Blog Post on IO Monad.
12th April 2020

If Haskell is a pure functional language then how does anything get done?

Useful programs need to perform input/output or I/O if there are to interact with the outside world. How else would a program read files, print to the screen and interact with the external world. I/O is the process of responding to input signals from the external world and responding with output signals.

Haskell is a purely functional language. Let's define purity.

Purity is the property of functions which when given the same input always return the same output.