(a | b | c) -> T
to (a -> T, b -> T, c -> T) -> T
where (a | b | c) is a sum type saying "it can be either a of type a, type b, or type c", and (a -> T, b-> T, c -> T) is a stand-in for a record of functions (i.e. the v-table of an instance of a visitor class).[0]: https://www.haskellforall.com/2021/01/the-visitor-pattern-is...
((a | b | c) -> T) -> T
This is just a mistake I made paraphrasing link 1.Teaser: the first OO language was Church's lambda calculus.
At the end of the day, all languages that are turing complete are the same language and the only differences lie in the kind of front end we provide. Unfortunately, we basically still have a single frontend, called C and every subsequent programming language has essentially just taken the C frontend and restricted or expanded it in small ways. We still ultimately work in terms of records, contiguous arrays and pointers. You can think of basically any more "advanced" construct in terms of pointers and it will make perfect sense nearly every time.