Document :cork |^ "barket"
commit7695afe509e0b61acb12d7d82ab3fcfde15c3463
author~hoclun-rigsep <jim.amberger@gmail.com>
dateSun 12 Feb 2017, 20:06 (10 years ago)
parent678f22d
docs/hoon/twig/bar-core/ket-cork.mdnew file+54
@@ -0,0 +1,54 @@
1+---
2+navhome: /docs
3+sort: 7
4+
5+---
6+
7+# `:cork |^ "barket"`
8+
9+`{$cork p/twig q/(map term foot)}`: form a core with battery and
10+anonymous arm `$` and kick it.
11+
12+## Expands to
13+
14+```
15+:per :core
16+ ++ $ p
17+ q
18+ --
19+$
20+```
21+
22+```
23+=> |%
24+ ++ $ p
25+ q
26+ --
27+$
28+```
29+
30+## Syntax
31+
32+Regular: *1-fixed*, then *battery*.
33+
34+## Examples
35+
36+A trivial cork:
37+
38+```
39+~zod:dojo> :cork
40+ (add n g)
41+ ++ n 42
42+ ++ g 58
43+ --
44+```
45+
46+```
47+~zod:dojo> |^
48+ (add n g)
49+ ++ n 42
50+ ++ g 58
51+ --
52+100
53+```
54+