> For the complete documentation index, see [llms.txt](https://docs.urbit.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.urbit.org/hoon/limbs/wing.md).

# Wings

`[%wing p=(list limb)]`

A wing is a limb search path into the subject.

## Produces <a href="#produces" id="produces"></a>

A wing is a list of limbs (including a trivial list of one limb). The limbs are resolved in succession. The result of the last limb resolution is the value produced by the wing expression.

## Syntax <a href="#syntax" id="syntax"></a>

Irregular: `a.b.c`. Read this as '`a` in `b` in `c`'. Finds limb `a` within limb `b` within limb `c` of the subject.

## Discussion <a href="#discussion" id="discussion"></a>

Intuitively, Hoon wings are written in the opposite order from attribute dot-paths in most languages. Hoon `a.b.c` is Java's `c.b.a`; it means "a within b within c."

Any item in the wing can resolve to a leg (fragment) or arm (computation). But if a non-terminal item in the wing would resolve to an arm, it resolves instead to the subject of the arm -- in other words, the core exporting that name.

The mysterious idiom `..b` produces the leg `.b` if `.b` is a leg; the core exporting `.b` if `.b` is an arm. Since `.` is the same limb as `+`, `..b` is the same wing as `+1.foo`.

## Examples <a href="#examples" id="examples"></a>

```
~zod:dojo> =a [fod=3 bat=[baz=1 moo=2]]

~zod:dojo> bat.a
[baz=1 moo=2]

~zod:dojo> moo.bat.a
2
```

## Wing Resolution <a href="#wing-resolution" id="wing-resolution"></a>

There are two common syntaxes used to resolve a wing path into the current subject: `.` dot and `:` col.

* `.` dot syntax, as `c.b.a`, resolves the wing path into the subject at the right hand using Nock 0 (or possibly Nock 9 or Nock 10 depending on the expression).

  ```hoon
  > !,(*hoon c.b.a)
  [%wing p=~[%c %b %a]]
  ```
* The `:` col operator expands to a `=>` tisgar to resolve the wing path against its right-hand side as the subject. This can be a Nock 7 or possibly optimized by the compiler to a Nock 0.

  ```hoon
  > !,(*hoon c:b:a)
  [%tsgl p=[%wing p=~[%c]] q=[%tsgl p=[%wing p=~[%b]] q=[%wing p=~[%a]]]]
  ```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.urbit.org/hoon/limbs/wing.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
