on master help sign in
Merge pull request #167 from cxk280/master

Small Tweaks to Arvo: Basic Hoon

commit8e3ac7af4144e78d13b9ac2b8b6ea02dd5c4bc59 authorFang <Fang-@users.noreply.github.com> dateSat 17 Jun 2017, 00:26 (9 years ago) parentb9f407ba2d9de0
2 files changed+19−19
docs/arvo/basic.md+18−18 docs/arvo/subject.md+1−1
docs/arvo/basic.md+18−18
@@ -283,33 +283,33 @@ Lookup each of these expressions (and all others!) in the [Twig Expressions](../
283283
2842841. There are two syntaxes for writing Hoon: tallform and wideform.
285285
286−In tallform, expressions are formed with either two spaces or a line
287−break separating both a rune from its children and each of its children
288−from one another. We use tallform when writing multiline expressions.
286+ In tallform, expressions are formed with either two spaces or a line
287+ break separating both a rune from its children and each of its children
288+ from one another. We use tallform when writing multiline expressions.
289289
290−For more concise expressions, we use wideform, which is always a single
291−line. Wideform can be used inside tallform expressions, but not vice
292−versa.
290+ For more concise expressions, we use wideform, which is always a single
291+ line. Wideform can be used inside tallform expressions, but not vice
292+ versa.
293293
294−Wideform expressions are formed with a rune followed by `()` containing
295−its children, all of which are separated by a single space. For example,
296−to make a cell of two elements:
294+ Wideform expressions are formed with a rune followed by `()` containing
295+ its children, all of which are separated by a single space. For example,
296+ to make a cell of two elements, use `:-(a b)`.
297297
298− :-(a b)
298+ We've already seen wideform in action, for example with
299+ `=((mod b 3) 0)`. In this case, `=` is actually an irregular form of
300+ `.=`, which tests its two children for equality.
299301
300−We've already seen wideform in action, for example with
301−`=((mod b 3) 0)`. In this case, `=` is actually an irregular form of
302−`.=`, which tests its two children for equality.
302+ Surrounding a function with `()` is an irregular wide form syntax for
303+ calling a function with *N* arguments. More on this later.
303304
304−Surrounding a function with `()` is an irregular wide form syntax for
305−calling a function with *N* arguments. More on this later.
305+2. For a set of multiple arguments following `|=` ('[bartis](../../hoon/twig/bar-core/tis-gate/)'), use `{` 'kel' and `}` 'ker.' For example: `{a/@u b/@u}`.
306306
307−1. `:-` makes a cell of values. The irregular wide form of this is
307+3. `:-` makes a cell of values. The irregular wide form of this is
308308 `[a b]`, with two expressions separated by a single space. While the
309309 regular form of this rune takes a fixed number of children (two),
310− its irregular wide form can accept *N* expressions: `[a1..an]`
310+ its irregular wide form can accept *N* expressions: `[a1..an]`.
311311
312−2. Cords are one datatype for text in Hoon. They're just a big atom
312+4. Cords are one datatype for text in Hoon. They're just a big atom
313313 formed from adjacent unicode bytes -- a "c string". To produce a
314314 cord, enclose text within single quotes. To set the type of an
315315 argument to a cord, use `@t`.
docs/arvo/subject.md+1−1
@@ -82,7 +82,7 @@ accessible.
8282**Exercises**:
8383
8484- Pass `++sum` its arguments (`2.000` and `3.000`) from the
85− commandline.
85+ command line.
8686
8787- Comment out all of the arms of the `|%`. Now add another arm and
8888 call it `++add`, have it accept two arguments and procduce 42