Skip to content
Adam Bliss edited this page Oct 25, 2013 · 1 revision

Implementation

++  comb
  ~/  %comb
  |=  [mal=tool buz=tool]
  ^-  tool
  ?:  ?&(?=([0 *] mal) !=(0 p.mal))
    ?:  ?&(?=([0 *] buz) !=(0 p.buz)) 
      [%0 (peg p.mal p.buz)]
    ?:  ?=([2 [0 *] [0 *]] buz)
      [%2 [%0 (peg p.mal p.p.buz)] [%0 (peg p.mal p.q.buz)]]
    [%7 mal buz]
  ?:  ?=([^ [0 1]] mal)
    [%8 p.mal buz]
  ?:  =([0 1] buz)
    mal
  [%7 mal buz]

Comments



Parts of this document are generated automatically. Edits within the comments section will be preserved.

Clone this wiki locally