on master help sign in
Merge pull request #789 from urbit/fix-brackets-threads

fix brackets in threads docs

commit782b078a6605d0b7009e409a2539983d5a769b2e authorpoprox <51337059+drbeefsupreme@users.noreply.github.com> dateMon 16 Aug 2021, 18:57 (5 years ago) parent15f374ea0b377d
3 files changed+10−10
content/docs/userspace/threads/basics/bind.md+5−5 content/docs/userspace/threads/basics/output.md+1−1 content/docs/userspace/threads/basics/summary.md+4−4
content/docs/userspace/threads/basics/bind.md+5−5
@@ -34,16 +34,16 @@ j
3434
3535## bind
3636
37−Bind by itself must be specialised like `(bind:m ,<type>)` and it takes two arguments:
37+Bind by itself must be specialised like `(bind:m ,&lt;type>)` and it takes two arguments:
3838
39−- The first argument is a function that returns the `form` of a strand which produces `<type>`.
40−- The second argument is a gate whose sample is `<type>` and which returns a `form`.
39+- The first argument is a function that returns the `form` of a strand which produces `&lt;type>`.
40+- The second argument is a gate whose sample is `&lt;type>` and which returns a `form`.
4141
42−Since you'll invariably use it in conjunction with micgal, the `<type>` in `;< <type> bind:m ...` will both specialise `bind` and specify the gate's sample.
42+Since you'll invariably use it in conjunction with micgal, the `&lt;type>` in `;< &lt;type> bind:m ...` will both specialise `bind` and specify the gate's sample.
4343
4444Bind calls the first function then, if it succeeded, calls the second gate with the result of the first as its sample. If the first function failed, it will instead just return an error message and not bother calling the next gate. So it's essentially "strand A then strand B".
4545
46−Since the second gate may itself contain another `;< <type> bind:m ...`, you can see how this allows you to glue together an arbitrarily large pipeline, where subsequent gates depend on the previous ones.
46+Since the second gate may itself contain another `;< &lt;type> bind:m ...`, you can see how this allows you to glue together an arbitrarily large pipeline, where subsequent gates depend on the previous ones.
4747
4848## strandio
4949
content/docs/userspace/threads/basics/output.md+1−1
@@ -4,7 +4,7 @@ weight = 4
44template = "doc.html"
55+++
66
7−A strand produces a `[(list card) <response>]`. The first part is a list of cards to be sent off immediately, and `<response>` is one of:
7+A strand produces a `[(list card) &lt;response>]`. The first part is a list of cards to be sent off immediately, and `&lt;response>` is one of:
88
99- `[%wait ~]`
1010- `[%skip ~]`
content/docs/userspace/threads/basics/summary.md+4−4
@@ -49,8 +49,8 @@ Now here's a quick recap of the main points covered:
4949#### bind
5050- is used to chain strands together like javascript promises
5151- is used in conjunction with micgal (`;<`)
52−- must be specialised to a type like `;< <type> bind:m ...`
53−- takes two arguments. The first is a function that returns the `form` of a `strand` that produces `<type>`. The second is a gate whose sample is `<type>` and which returns a `form`.
52+- must be specialised to a type like `;< &lt;type> bind:m ...`
53+- takes two arguments. The first is a function that returns the `form` of a `strand` that produces `&lt;type>`. The second is a gate whose sample is `&lt;type>` and which returns a `form`.
5454- calls the first and then, if it succeeded, calls the second with the result of the first as its sample.
5555
5656## Strand input
@@ -62,9 +62,9 @@ Now here's a quick recap of the main points covered:
6262
6363## Strand output
6464
65−- contains `[cards=(list card:agent:gall) <response>]`
65+- contains `[cards=(list card:agent:gall) &lt;response>]`
6666- `cards` are any cards to be sent immediately
67−- `<response>` is something like `[%done value]`, `[%fail err]`, etc.
67+- `&lt;response>` is something like `[%done value]`, `[%fail err]`, etc.
6868- `%done` will contain the result
6969- responses are only used internally to manage the flow of the thread and are not returned to subscribers.
7070