hnock

A Nock interpreter.
Log | Files | Refs | README | LICENSE

commit 953240c635f8a46aced652963de9b87404b6a1fa
parent a6011df4ebeab089028a46ff6973aec2e55e8126
Author: Jared Tobin <jared@jtobin.io>
Date:   Fri,  1 Feb 2019 07:42:51 +1300

Add 4K spec. [ci skip]

Diffstat:
Aspec/4.txt | 41+++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+), 0 deletions(-)

diff --git a/spec/4.txt b/spec/4.txt @@ -0,0 +1,41 @@ +nock(a) *a +[a b c] [a [b c]] + +?[a b] 0 +?a 1 ++[a b] +[a b] ++a 1 + a +=[a a] 0 +=[a b] 1 + +/[1 a] a +/[2 a b] a +/[3 a b] b +/[(a + a) b] /[2 /[a b]] +/[(a + a + 1) b] /[3 /[a b]] +/a /a + +#[1 a b] a +#[(a + a) b c] #[a [b /[(a + a + 1) c]] c] +#[(a + a + 1) b c] #[a [/[(a + a) c] b] c] +#a #a + +*[a [b c] d] [*[a b c] *[a d]] + +*[a 0 b] /[b a] +*[a 1 b] b +*[a 2 b c] *[*[a b] *[a c]] +*[a 3 b] ?*[a b] +*[a 4 b] +*[a b] +*[a 5 b c] =[*[a b] *[a c]] + +*[a 6 b c d] *[a *[[c d] 0 *[[2 3] 0 *[a 4 4 b]]]] +*[a 7 b c] *[*[a b] c] +*[a 8 b c] *[[*[a b] a] c] +*[a 9 b c] *[*[a c] 2 [0 1] 0 b] +*[a 10 [b c] d] #[b *[a c] *[a d]] + +*[a 11 [b c] d] *[[*[a c] *[a d]] 0 3] +*[a 11 b c] *[a c] + +*a *a