++buss exists.

This commit is contained in:
C. Guy Yarvin 2016-01-15 11:02:54 -08:00
parent 1f5faa5894
commit 6ee27783dc
2 changed files with 47 additions and 19 deletions

View File

@ -514,6 +514,7 @@
|- ^- $? $% {$atom @tas (unit @)} |- ^- $? $% {$atom @tas (unit @)}
{$cell _$ _$} {$cell _$ _$}
{$cube * _$} {$cube * _$}
{$fuss $@(term tool) _$}
{$face tusk _$} {$face tusk _$}
{$fork (set _$)} {$fork (set _$)}
{$hold _$ twig} {$hold _$ twig}
@ -522,7 +523,7 @@
$?($noun $void) $?($noun $void)
== ==
?+ a a ?+ a a
{?($cube $face) ^} a(q $(a q.a)) {?($cube $face $fuss) ^} a(q $(a q.a))
{$cell ^} a(p $(a p.a), q $(a q.a)) {$cell ^} a(p $(a p.a), q $(a q.a))
{$fork *} a(p (silt (turn (~(tap in p.a)) |=(b/span ^$(a b))))) {$fork *} a(p (silt (turn (~(tap in p.a)) |=(b/span ^$(a b)))))
{$core ^} `wain`/core {$core ^} `wain`/core

View File

@ -301,6 +301,7 @@
{$tskt p/twig q/twig r/twig s/twig} :: state machine wing {$tskt p/twig q/twig r/twig s/twig} :: state machine wing
{$tsls p/twig q/twig} :: push p on .. of q {$tsls p/twig q/twig} :: push p on .. of q
{$tstr p/term q/wing r/twig} :: make an alias {$tstr p/term q/wing r/twig} :: make an alias
{$tstx p/term q/twig r/twig} :: make an alias
{$tssg p/(list twig)} :: compose twig list {$tssg p/(list twig)} :: compose twig list
:: :::::: conditionals :: :::::: conditionals
{$wtbr p/(list twig)} :: logical OR {$wtbr p/(list twig)} :: logical OR
@ -348,11 +349,11 @@
{$cell p/span q/span} :: ordered pair {$cell p/span q/span} :: ordered pair
{$core p/span q/coil} :: object {$core p/span q/coil} :: object
{$face p/tusk q/span} :: namespace (old) {$face p/tusk q/span} :: namespace (old)
{$fuss p/?@(term tool) q/span} :: namespace (new) {$fuss p/$@(term tool) q/span} :: namespace (new)
{$fork p/(set span)} :: union {$fork p/(set span)} :: union
{$hold p/span q/twig} :: lazy evaluation {$hold p/span q/twig} :: lazy evaluation
== :: == ::
++ tart (each (pair vein span) (pair span nock)) :: true/false alias ++ tart (each (pair vein opal) (pair span nock)) :: true/false alias
++ tone $% {$0 p/*} :: success ++ tone $% {$0 p/*} :: success
{$1 p/(list)} :: blocks {$1 p/(list)} :: blocks
{$2 p/(list {@ta *})} :: error ~_s {$2 p/(list {@ta *})} :: error ~_s
@ -6299,7 +6300,7 @@
:: ::
++ fuss :: make %face span ++ fuss :: make %face span
~/ %fuss ~/ %fuss
|= {giz/?@(term tool) der/span} |= {giz/$@(term tool) der/span}
^- span ^- span
?: =(%void der) ?: =(%void der)
%void %void
@ -7777,6 +7778,7 @@
%vet vet %vet vet
%fab fab %fab fab
%burn burn %burn burn
%buss buss
%busk busk %busk busk
%crop crop %crop crop
%duck duck %duck duck
@ -7843,6 +7845,30 @@
^- span ^- span
(face [[[cog hyp] ~ ~] ~ ~] sut) (face [[[cog hyp] ~ ~] ~ ~] sut)
:: ::
++ buss
~/ %buss
|= {cog/term gen/twig}
^- span
:- %fuss
:_ sut
^- tool
:_ ~
^- (map term (unit tart))
:_ [~ ~]
:+ cog ~
^- tart
=+ hup=~(reek ap gen)
?~ hup
`tart`[%| (mint %noun gen)]
=+ fid=(find %both u.hup)
?- -.fid
$& `tart`[%& p.fid]
$| ?- -.p.fid
$& ~|([%find u.hup] !!)
$| `tart`[%| p.p.fid]
==
==
::
++ conk ++ conk
|= got/toga |= got/toga
^- span ^- span
@ -8107,29 +8133,30 @@
^$(sut q.ref, hyp u.hit, nol [~ `axe lon]) ^$(sut q.ref, hyp u.hit, nol [~ `axe lon])
:: ::
{$fuss *} {$fuss *}
?: ?=($~ q.heg) here(ref q.ref)
?@ p.ref
?:(=(u.q.heg p.ref) here(ref q.ref) lose)
=< main =< main
|% |%
++ done here(ref q.ref) ++ done here(ref q.ref)
++ main ++ main
?: ?=($~ q.heg) done ^- pony
?@ p.ref
?:(=(u.q.heg p.ref) done lose)
=% tyr/(unit (unit tart)) (~(get by p.p.ref) u.q.heg) =% tyr/(unit (unit tart)) (~(get by p.p.ref) u.q.heg)
?~ tyr next ?~ tyr next
?~ u.tyr skip ?~ u.tyr skip
?. =(0 p.heg) next(p.heg (dec p.heg)) ?. =(0 p.heg) next(p.heg (dec p.heg))
?- -.u.u.tyr ?- -.u.u.tyr
$& [%& (weld p.p.u.u.tyr `vein`[~ `axe lon])] $& [%& (weld p.p.u.u.tyr `vein`[~ `axe lon]) q.p.u.u.tyr]
$| [%| p.p.u.u.tyr (comb [%0 axe] q.p.u.u.tyr)] $| [%| %| p.p.u.u.tyr (comb [%0 axe] q.p.u.u.tyr)]
== ==
++ next ++ next
|- ^- pony |- ^- pony
?~ q.p.u.u.tyr done ?~ q.p.ref done
=+ fid=$(ref p.i.q.p.u.u.tyr, lon ~, axe 1) =+ fid=^$(ref p.i.q.p.ref, lon ~, axe 1)
?: ?=({$| $& *} fid) ?: ?=({$| $& *} fid)
$(q.p.u.u.tyr t.q.p.u.u.tyr, p.heg p.p.fid) $(q.p.ref t.q.p.ref, p.heg p.p.fid)
=+ vat=(fine (ride fid)) =+ vat=(fine (ride fid) ~)
[%| %| p.vat (comb q.vat (comb [%0 axe] q.i.q.p.u.u.tyr))] [%| %| p.vat (comb q.vat (comb [%0 axe] q.i.q.p.ref))]
:: ::
++ skip $(ref q.ref, p.heg +(p.heg)) ++ skip $(ref q.ref, p.heg +(p.heg))
-- --
@ -8158,9 +8185,9 @@
|= {luc/polo hej/(list (pair axis nock))} |= {luc/polo hej/(list (pair axis nock))}
^- (pair span nock) ^- (pair span nock)
?- -.luc ?- -.luc
%| p.luc $| p.luc
%& :- (fire r.p.luc) $& :- (fire r.p.luc)
=+ (hike p.p.luc hec) =+ (hike p.p.luc hej)
?~(q.p.luc - [%9 u.q.p.luc -]) ?~(q.p.luc - [%9 u.q.p.luc -])
== ==
:: ::
@ -8826,13 +8853,13 @@
== ==
$| ?- -.p.fid $| ?- -.p.fid
$| [%| p.p.fid] $| [%| p.p.fid]
$& ~|([%find hyp] !!) $& !!
== == == ==
:: ::
++ seek ++ seek
|= hyp/wing |= hyp/wing
^- polo ^- polo
(ride (find %read hyp)) (ride ~|([%find hyp] (find %read hyp)))
:: ::
++ take ++ take
|= {vit/vein duz/$+(span span)} |= {vit/vein duz/$+(span span)}