Nock

32 thoughts
last posted Oct. 18, 2013, 4:24 p.m.

4 earlier thoughts

0

The Nock 5K spec is:

1  ::    nock(a)           *a
2  ::    [a b c]           [a [b c]]
3  ::
4  ::    ?[a b]            0
5  ::    ?a                1
6  ::    +[a b]            +[a b]
7  ::    +a                1 + a
8  ::    =[a a]            0
9  ::    =[a b]            1
10 ::    =a                =a   
11 ::
12 ::    /[1 a]            a
13 ::    /[2 a b]          a
14 ::    /[3 a b]          b
15 ::    /[(a + a) b]      /[2 /[a b]]
16 ::    /[(a + a + 1) b]  /[3 /[a b]]
17 ::    /a                /a
18 ::
19 ::    *[a [b c] d]      [*[a b c] *[a d]]
20 ::
21 ::    *[a 0 b]          /[b a]
22 ::    *[a 1 b]          b
23 ::    *[a 2 b c]        *[*[a b] *[a c]]
24 ::    *[a 3 b]          ?*[a b]
25 ::    *[a 4 b]          +*[a b]
26 ::    *[a 5 b]          =*[a b]
27 ::
28 ::    *[a 6 b c d]      *[a 2 [0 1] 2 [1 c d] [1 0] 2 [1 2 3] [1 0] 4 4 b]
29 ::    *[a 7 b c]        *[a 2 b 1 c]
30 ::    *[a 8 b c]        *[a 7 [[7 [0 1] b] 0 1] c]
31 ::    *[a 9 b c]        *[a 7 c 2 [0 1] 0 b]
32 ::    *[a 10 [b c] d]   *[a 8 c 7 [0 3] d]
33 ::    *[a 10 b c]       *[a c]
34 ::
35 ::    *a                *a

27 later thoughts