This is message selectors. We've finally rediscovered OOP in functional programming, and can close down the whole racket (pardon the pun). [Obligatory talk where I did this same trick, but in Swift, in 2018:
https://www.youtube.com/watch?v=IQl1EmR9Hus&list=PLKMpKKmHd2...]