on master help sign in
async monad: syntax highlights
f290901Matilde Park
tutorials/hoon/async-monad.md+3−3
@@ -8,7 +8,7 @@ Gall apps can be difficult to understand and simple ones often don't need the fu
8
8
9The following code is from `app/example-tapp-fetch.hoon` Much of this file should already be pretty readable, particularly given the comments in it so we'll focus here on specific parts of the file rather than a full walkthrough. This app is intended to get the top comment of the top ten stories on Hacker News.
9The following code is from `app/example-tapp-fetch.hoon` Much of this file should already be pretty readable, particularly given the comments in it so we'll focus here on specific parts of the file rather than a full walkthrough. This app is intended to get the top comment of the top ten stories on Hacker News.
10
10
11−```
11+```hoon
12:: Little app to demonstrate the structure of programs written with the
12:: Little app to demonstrate the structure of programs written with the
13:: transaction monad.
13:: transaction monad.
14::
14::
@@ -160,7 +160,7 @@ The following code is from `app/example-tapp-fetch.hoon` Much of this file shoul
160
160
161As indicated by the comments, `handle-poke` is the main arm of our Gall app. This is equivalent to the `poke` arms in a standard Gall app, but will not differentiate by mark. Let's look at the first part of this gate.
161As indicated by the comments, `handle-poke` is the main arm of our Gall app. This is equivalent to the `poke` arms in a standard Gall app, but will not differentiate by mark. Let's look at the first part of this gate.
162
162
163−```
163+```hoon
164++ handle-poke
164++ handle-poke
165 |= =in-poke-data
165 |= =in-poke-data
166 =/ m tapp-async
166 =/ m tapp-async
@@ -196,7 +196,7 @@ The most important part to see here is the `;<` rune. If you're familiar with mo
196
196
197In a number of cases `D` here is going to be another `;<` rune. This is how you can chain these together to perform a lot of asynchronous actions that need to all complete.
197In a number of cases `D` here is going to be another `;<` rune. This is how you can chain these together to perform a lot of asynchronous actions that need to all complete.
198
198
199−```
199+```hoon
200 ::
200 ::
201 :: Otherwise, fetch the top HN stories
201 :: Otherwise, fetch the top HN stories
202 ::
202 ::