1 min read

C311 Interpreter in Co-dfns

Some people might enjoy a C311 Interpreter in Co-dfns. This was done at the request of Jason Hemann.

Interpret←{⍺←0 2⍴⍬ ⋄ t←⊃0 1⌷⍵
  t≡'Symbol':⊃((0⌷⍉⍺)⍳0 2⌷⍵)1⌷⍉⍺
  ⊃((⍺⍪⍨(0 2⌷⊣),∘⊂⊢)∇1↓⊣)/⍺∘∇¨⍵⊂[0]⍨(1+⊃⍵)=0⌷⍉⍵

This version uses a flat encoding of the program tree similiar to the ⎕XML format.

Please consider supporting me on GitTip.