on master help sign in
a a
d91bdb9drbeefsupreme
hoon/hoon-school/iron-polymorphism.md+1−1
@@ -5,7 +5,7 @@ template = "doc.html"
5aliases = ["/docs/learn/hoon/hoon-tutorial/iron-polymorphism/"]
5aliases = ["/docs/learn/hoon/hoon-tutorial/iron-polymorphism/"]
6+++
6+++
7
7
8−Polymorphism is a programming concept that allows a a piece of code to use different types at different times. It's a common technique in most languages to make code that can be reused for many different situations, and Hoon is no exception. Let's take a look at a [gate](/docs/glossary/gate/) from the Hoon standard library as an example; we'll be passing a few different types in. The code below is an excerpt from `hoon.hoon` and, as such, will not run as-is by itself.
8+Polymorphism is a programming concept that allows a piece of code to use different types at different times. It's a common technique in most languages to make code that can be reused for many different situations, and Hoon is no exception. Let's take a look at a [gate](/docs/glossary/gate/) from the Hoon standard library as an example; we'll be passing a few different types in. The code below is an excerpt from `hoon.hoon` and, as such, will not run as-is by itself.
9
9
10`fold` is a _wet_ gate that takes two arguments and produces a _dry_ gate. But what are wet and dry gates?
10`fold` is a _wet_ gate that takes two arguments and produces a _dry_ gate. But what are wet and dry gates?
11
11