A trap is a core with one arm named $ and no sample. They are often used in similar ways to looping structures in other programming languages.
Further Reading
- The Hoon Tutorial: Our guide to learning the Hoon programming language.
- Lesson 1.4.1: Walkthrough: Recursion: A Hoon Tutorial lesson that uses traps to build recursive functions.