Haskell Reference
March 31, 2021
lazy
,atomic/stateless
,strong typing
,pure (no side effects)
Some pros
- concurrency faster
What are haskell bindings?
What are monads?
- forcing side effects into haskell
What is haskell better for?
- compilers/DSLs
Syntax
Guards - otherwise
Where (avoid repeition)
betterTrafficController :: Double -> Picture
betterTrafficController t -- for mapping loop here --
| t2 < 5 = betterTrafficLight 0
| t2 < 7 = betterTrafficLight 1
| t2 < 12 = betterTrafficLight 2
| otherwise = betterTrafficLight 3
where
t2 = round (t) `mod` (14)