Agenda

<aside> 📌 Reminders

Haskell Review


Custom Data Types

Useful built-in

Lab exercise


Math tree represents mathematical expression

e.g

$|-3| + 2 * 5 - 3$

would look like this

                *
              /   \
             +     -
           /   \  /  \
          ||    2 5   3
          |
          -3

and in Haskell

Binary (*) (Binary (+) (Unary abs (Leaf -3)) (Leaf 2)) (Binary (-) (Leaf 5) (Leaf 3)
  1. eval