Typespecs
Get to know about typespecs and their significance in this lesson.
What are TypeSpecs?
Functional languages depend heavily on types to determine how functions interact with one another. We can dramatically improve a function’s declaration of intent with typespecs.
A typespec annotates the expected input and outputs of a function.
Typespecs aren’t required, but they may be worthwhile because they require the developer to explicitly state what a function accepts and what it returns.
Get hands-on with 1300+ tech skills courses.