
Abstraction and Learning with Runar Bjarnason
CoRecursive: Coding Stories
00:00
A Function Is Contravariant in Its Argument
A function is contravariant in its argument. The more abstract and precise i write the definition of my function that allows for more reuse, or more potential collars of it. As you grow this type he things that you could possibly receive, you make it easier to use. But at the same time, that limits what you can do because you have to cover the most general case right? And conversely, if you shrink the typewoud make it more difficult to use.
Transcript
Play full episode