Protocol

A protocol, that is, the composition and ordering of the exchanged messages. (M. Stamp)…

What is a Parser?

What is a parser? Really, a parser is just a function that consumes less-structured input and produces more-structured output. By its very nature, a parser is a partial function—some values in the domain do not correspond to any value in the range—so all parsers must have some notion…

Polymorphic types

“The requirements of a polymorphic type, by definition, come from where you use the type, not from the type itself.” (S. Parent) "When I use inheritance, I build the use of my object into my object. On the contrary, what I want to do is separate the use of my…

What is an algebra?

An algebra is just a type τ with some functions and identities. These functions take differing numbers of arguments of type τ and produce a τ; uncurried, they all look like (τ, τ,…, τ) → τ. They can also have "identities"—elements of τ that have special behavior with some of…