Strategy 3: Context Passing Implementation
Idea: Pass `cat` a representation of its context.
(xs `cat` ys) `cat` zs
Inner `cat` recognises
it’s the left arg of a `cat`
xs `cat` (ys `cat` zs)
Rewrites by associativity
to more efficient form
Föregående bild
Nästa bild
Tillbaka till första bilden
Visa grafisk version