Merge remote-tracking branch 'eglaysher/deco'

This commit is contained in:
C. Guy Yarvin 2017-11-14 13:24:55 -08:00
commit 8661c292ed

View File

@ -78,9 +78,8 @@
:- %say :- %say
|= * |= *
=< [%noun (say-hello %world)] =< [%noun (say-hello %world)]
=> :> # => :> # %arch
:> # %arch :>
:> #
:> structures for our imaginary hello, world generator. :> structures for our imaginary hello, world generator.
:> :>
:> nothing forces us to put structures in a separate core. :> nothing forces us to put structures in a separate core.
@ -95,6 +94,7 @@
:> in a separate chapter (separated by {+|}). :> in a separate chapter (separated by {+|}).
|% |%
:> # %model :> # %model
:>
:> models (molds) are functions that normalize nouns. :> models (molds) are functions that normalize nouns.
:> :>
:> arms producing molds are introduced with {+=}. for molds, :> arms producing molds are introduced with {+=}. for molds,
@ -103,16 +103,16 @@
+| +|
+= spot [p=@ q=@] :< a coordinate += spot [p=@ q=@] :< a coordinate
+= tops :> also a coordinate += tops :> also a coordinate
{p/@ q/@} [p=@ q=@]
+= goof :> a simple tuple += goof :> a simple tuple
$: foo/@ :< something mysterious $: foo=@ :< something mysterious
bar/@ :< go here for drink bar=@ :< go here for drink
moo/(binary-tree juice) :< cows do this moo=(binary-tree juice) :< cows do this
== ==
+= juice :> fruity beverage += juice :> fruity beverage
$% {$plum p/@} :< fresh prune $% [%plum p=@] :< fresh prune
{$pear p/@ q/@} :< good for cider [%pear p=@ q=@] :< good for cider
{$acai p/@} :< aztec superfood [%acai p=@] :< aztec superfood
== ==
:> # :> #
:> # %pattern :> # %pattern
@ -124,8 +124,8 @@
:> or "higher-kinded types". :> or "higher-kinded types".
+| +|
++ binary-tree :< tree pattern ++ binary-tree :< tree pattern
|* a/$-(* *) |* a=$-(* *)
$@($~ {n/a l/(binary-tree a) r/(binary-tree a)}) $@($~ [n=a l=(binary-tree a) r=(binary-tree a)])
:> # :> #
:> # %constant :> # %constant
:> # :> #
@ -134,8 +134,9 @@
++ answer :< answer to everything ++ answer :< answer to everything
42 42
-- --
:> #
:> # %work :> # %work
:> :> #
:> engines for our imaginary hello, world app. :> engines for our imaginary hello, world app.
:> :>
:> note that ++say-goodbye is the correct notation, even though :> note that ++say-goodbye is the correct notation, even though
@ -147,7 +148,7 @@
:> :>
|= :> txt: friend to say hi to |= :> txt: friend to say hi to
:> :>
txt/term txt=term
^- tape ^- tape
"hello, {(rip 3 txt)}" "hello, {(rip 3 txt)}"
:> ++say-goodbye: say a really proper goodbye :> ++say-goodbye: say a really proper goodbye
@ -164,8 +165,8 @@
:> :>
|= :> txt: departing friend |= :> txt: departing friend
:> num: number of friends :> num: number of friends
$: txt/term $: txt=term
num/@ num=@
== ==
^- tape ^- tape
:> foo: four :> foo: four
@ -176,6 +177,6 @@
"goodbye and {(scot %ud moo)}, {(rip 3 txt)}" "goodbye and {(scot %ud moo)}, {(rip 3 txt)}"
:> :> ++say-minimum :> :> ++say-minimum
++ say-minimum :> minimal decoration ++ say-minimum :> minimal decoration
|= txt/term |= txt=term
"nothing to say to {(rip 3 txt)}" "nothing to say to {(rip 3 txt)}"
-- --