> For the complete documentation index, see [llms.txt](https://calnotes.gitbook.io/cs61a-guidebook/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://calnotes.gitbook.io/cs61a-guidebook/building-blocks/higher-order-functions/self-reference.md).

# Self-Reference

A function that refers to itself.

No talk of higher-order functions can be complete without a discussion of self-reference. The idea behind self-reference is a function that refers to itself in its body.

Note that this is not recursion — a recursive function is a function that *calls* itself within its own body. The difference is slight but incredibly important.
