it compiles now

This commit is contained in:
Ted Blackman 2022-11-29 23:59:04 -06:00
parent 2b18091c28
commit 638b761e93
3 changed files with 329 additions and 238 deletions

View File

@ -1,38 +1,39 @@
/+ ska
/- *sock
/- *gene
/+ ska
|%
++ plot
=| ski=farm
|= ent=barn
^- [boot farm]
=/ ext (~(get by ski) ent)
=/ ext (~(get by yard.ski) ent)
?. ?=(~ ext) [says.u.ext ski]
=; [res sku] [says.res sku(yard (~(put by yard.sku) ent res), wood [ent wood.sku]]
=. ski ski(yard (~(put by yard.ski) ent [[%zer 0 %.n] [%risk %toss ~]])) :: blackhole, guard recursion
|-
^- [[does=nomm says=boot:ska] farm]
=; [res=[does=nomm says=boot:ska] sku=farm]
[says.res sku(yard (~(put by yard.sku) ent res), wood [ent wood.sku])]
:: blackhole, guard recursion
=. ski ski(yard (~(put by yard.ski) ent [[%zer 0 %.n] [%risk %toss ~]]))
|- ^- [[does=nomm says=boot:ska] farm]
=<
?+ for.ent bomb
[[* *] *]
=^ [doth sath] ski $(for.ent -.for.ent)
=^ [doth=nomm sath=boot:ska] ski $(for.ent -.for.ent)
?: ?=([%boom ~] sath) bomb
=^ [toes tays] ski $(for.ent +.for.ent)
=^ [toes=nomm tays=boot:ska] ski $(for.ent +.for.ent)
?: ?=([%boom ~] tays) bomb
:_ ski
:_ (cobb:ska sath tays)
[%par doth sath]
::
[%par doth toes]
::
[%0 @]
:: we can decompose the axis into two axes, a safe axis which can
:: be implemented unchecked, and an unsafe axis which must be
:: checked. We then compose these two axes into safe %zer and
:: unsafe %zer composed by %sev
=/ [saf rik ken] (punt:ska +.for.ent sub.ent)
=+ [saf rik ken]=(punt:ska +.for.ent sub.ent)
?: =(0 saf) bomb
:_ ski
?: =(1 rik) [[%zer saf %.y] [%safe ken]]
?: =(1 saf) [[%zer rik %.n] [%risk ken]]
:_ ski
:_ [%risk ken]
[%sev [%zer saf %.y] [%zer rik %.n]]
::
@ -40,11 +41,11 @@
:_ ski
:_ [%safe %know +.for.ent]
[%one +.for.ent]
::
::
[%2 * *]
=^ [dost sass] ski $(for.ent +<.for.ent)
=^ [dost=nomm sass=boot:ska] ski $(for.ent +<.for.ent)
?: ?=([%boom ~] sass) bomb
=^ [doff faff] ski $(for.ent +>.for.ent)
=^ [doff=nomm faff=boot:ska] ski $(for.ent +>.for.ent)
?: ?=([%boom ~] faff) bomb
=/ skun
?- sass
@ -64,16 +65,16 @@
:_ ski
:_ [%risk %toss ~]
[%two dost doff skun ~ %.n]
::
::
[%3 *]
=^ [deft koob] ski $(for.ent +.for.ent)
=^ [deft=nomm koob=boot:ska] ski $(for.ent +.for.ent)
?: ?=([%boom ~] koob) bomb
:_ ski
:_ (ques:ska koob)
[%thr deft]
::
::
[%4 *]
=^ [dink sink] ski $(for.ent +.for.ent)
=^ [dink=nomm sink=boot:ska] ski $(for.ent +.for.ent)
?: ?=([%boom ~] sink) bomb
=/ rink
?- sink
@ -83,76 +84,81 @@
:_ ski
:_ (pile:ska sink)
[%fou dink ?|(?=([%dice ~] rink) ?=([%flip ~] rink) ?=([%know @] rink))]
::
::
[%5 * *]
=^ [dome foam] ski $(for.ent +<.for.ent)
=^ [dome=nomm foam=boot:ska] ski $(for.ent +<.for.ent)
?: ?=([%boom ~] foam) bomb
=^ [doot foot] ski $(for.ent +>.for.ent)
=^ [doot=nomm foot=boot:ska] ski $(for.ent +>.for.ent)
?: ?=([%boom ~] foot) bomb
:_ ski
:_ (bopp:ska foam foot)
[%fiv dome doot]
::
::
[%6 * * *]
=^ [dawn sond] ski $(for.ent +<.for.ent)
=^ [dawn=nomm sond=boot:ska] ski $(for.ent +<.for.ent)
?: ?=([%safe %know %0] sond) $(for.ent +>-.for.ent)
?: ?=([%safe %know %1] sond) $(for.ent +>+.for.ent)
?: ?=([%safe %know *] sond) bomb
?: ?=([%safe %bets *] sond) bomb
?: ?=([%safe %know *] sond) bomb
?: ?=([%safe %bets *] sond) bomb
?: ?=([%safe %flip ~] sond)
=^ [drew slew] ski $(for.ent +>-.for.ent)
=^ [darn song] ski $(for.ent +>+.for.ent)
=^ [drew=nomm slew=boot:ska] ski $(for.ent +>-.for.ent)
=^ [darn=nomm song=boot:ska] ski $(for.ent +>+.for.ent)
:_ ski
:_ (gnaw:ska slew song)
[%six dawn slew song]
[%six dawn drew darn]
?: ?=([%risk %know %0] sond)
=^ [drew slew] ski $(for.ent +>-.for.ent)
=^ [drew=nomm slew=boot:ska] ski $(for.ent +>-.for.ent)
:_ ski
:_ (dare:ska slew)
[%sev [dawn drew] [%zer 3 %.y]]
:: run dawn in case it crashes, but throw it away
[%sev [%par dawn drew] [%zer 3 %.y]]
?: ?=([%risk %know %1] sond)
=^ [darn song] ski $(for.ent +>+.for.ent)
=^ [darn=nomm song=boot:ska] ski $(for.ent +>+.for.ent)
:_ ski
:_ (dare:ska song)
[%sev [dawn darn] [%zer 3 %.y]]
?: ?=([%risk %know *] sond) bomb
?: ?=([%risk %bets *] sond) bomb
=^ [drew slew] ski $(for.ent +>-.for.ent)
=^ [darn song] ski $(for.ent +>+.for.ent)
:: run dawn in case it crashes, but throw it away
[%sev [%par dawn darn] [%zer 3 %.y]]
?: ?=([%risk %know *] sond) bomb
?: ?=([%risk %bets *] sond) bomb
=^ [drew=nomm slew=boot:ska] ski $(for.ent +>-.for.ent)
=^ [darn=nomm song=boot:ska] ski $(for.ent +>+.for.ent)
:_ ski
:_ (dare:ska (gnaw:ska slew song))
[%six dawn drew darn]
::
::
[%7 * *]
=^ [deck keck] ski $(for.ent +<.for.ent)
=^ [deck=nomm keck=boot:ska] ski $(for.ent +<.for.ent)
?: ?=([%boom ~] keck) bomb
=/ news
?- keck
[%safe *] sure.keck
[%risk *] hope.keck
==
=^ [dest zest] ski $(sub.ent news, for.ent +>.for.ent)
=^ [dest=nomm zest=boot:ska] ski $(sub.ent news, for.ent +>.for.ent)
?: ?=([%boom ~] zest) bomb
:_ ski
:_ ?: ?=([%safe *] keck) zest (dare:ska zest)
[%sev deck dest]
::
::
[%8 * *]
=^ [pink pest] ski $(for.ent +<.for.ent)
=^ [pink=nomm pest=boot:ska] ski $(for.ent +<.for.ent)
?: ?=([%boom ~] pest) bomb
=/ nest
?- pest
[%safe *] sure.pest
[%risk *] hope.pest
==
=^ [dest zest] ski $(sub.ent (knit nest sub.ent), for.ent +>.for.ent)
=^ [dest=nomm zest=boot:ska] ski
$(sub.ent (knit:ska nest sub.ent), for.ent +>.for.ent)
?: ?=([%boom ~] zest) bomb
:_ ski
:_ ?: ?=([%safe *] pest) zest) (dare:ska zest)
:_ ?: ?=([%safe *] pest)
zest
(dare:ska zest)
[%eig pink dest]
::
::
[%9 @ *]
=^ [lore sore] ski $(for.ent +>.for.ent)
=^ [lore=nomm sore=boot:ska] ski $(for.ent +>.for.ent)
?: ?=([%boom ~] sore) bomb
=/ news
?- sore
@ -163,7 +169,9 @@
?: ?=([%safe %know *] fork)
=^ ret ski ^$(ent [news know.sure.fork])
:_ ski
:_ ?: ?=([%safe *] sass) ret (dare:ska ret)
:_ ?: ?=([%safe *] sore)
ret
(dare:ska ret)
[%nin +<.for.ent lore news (some know.sure.fork) %.y]
?: ?=([%risk %know *] fork)
=^ ret ski ^$(ent [news know.hope.fork])
@ -173,244 +181,326 @@
:_ ski
:_ [%risk %toss ~]
[%nin +<.for.ent lore news ~ ?=([%safe *] fork)]
::
::
[%10 [@ *] *]
=^ [neat seat] ski $(for.ent +>.for.ent)
=^ [neat=nomm seat=boot:ska] ski $(for.ent +>.for.ent)
?: ?=([%boom ~] seat) bomb
=^ [pace spat] ski $(for.ent +<+.for.ent)
=^ [pace=nomm spat=boot:ska] ski $(for.ent +<+.for.ent)
?: ?=([%boom ~] spat) bomb
=/ teak
?- seat
[%safe *] sure.seat
[%risk *] hope.seat
==
=/ [saf rik ken] (punt +<-.for.ent teak)
=+ [saf rik ken]=(punt:ska +<-.for.ent teak)
?: =(0 saf) bomb
:_ ski
:_ (welt:ska +<-.for.ent spat seat)
?: =(1 rik)
:_ [(welt +<-.for.ent spat seat) ski]
:_ [%ten [+<-.for.ent pace] neat %.y]
:_ [(welt +<-.for.ent spat seat) ski]
:_ [%sev [neat pace] %ten [saf %ten [rik %zer 3 %.n] [%zer (peg 2 saf) %.y] %.y] [%zer 2 %.y] %.y]
::
[%ten [+<-.for.ent pace] neat %.y]
^- nomm
:+ %sev [%par neat pace]
:+ %ten
[saf %ten [rik %zer 3 %.n] [%zer (peg saf 2) %.y] %.y]
[[%zer 2 %.y] %.y]
::
[%11 @ *]
=^ [real seal] ski $(for.ent +>.for.ent)
=^ [real=nomm seal=boot:ska] ski $(for.ent +>.for.ent)
?: ?=([%boom ~] seal) bomb
:_ [seal ski]
:_ [%els +<.for.ent real]
::
^- [[does=nomm says=boot:ska] farm]
[[[%els +<.for.ent real] seal] ski]
::
[%11 [@ *] *]
=^ [fake sake] ski $(for.ent +<+.for.ent)
=^ [fake=nomm sake=boot:ska] ski $(for.ent +<+.for.ent)
?: ?=([%boom ~] sake) bomb
=^ [real seal] ski $(for.ent +>.for.ent)
=^ [real=nomm seal=boot:ska] ski $(for.ent +>.for.ent)
?: ?=([%boom ~] seal) bomb
:_ ski
?: ?=([%safe *] sake)
[[%eld [+<-.for.ent fake] real %.y] seal]
[[%eld [+<-.for.ent fake] real %.n] seal]
::
::
[%12 * *]
=^ [fear sear] ski $(for.ent +<.for.ent)
=^ [fear=nomm sear=boot:ska] ski $(for.ent +<.for.ent)
?: ?=([%boom ~] sear) bomb
=^ [pack sack] ski $(for.ent +>.for.ent)
=^ [pack=nomm sack=boot:ska] ski $(for.ent +>.for.ent)
?: ?=([%boom ~] sack) bomb
:_ [[%risk %toss ~] ski]
:_ ski
:_ [%risk %toss ~]
[%twe fear pack]
==
|%
++ bomb [[%zer 0 %.n] [%boom ~] ski]
++ bomb
^- [[nomm boot:ska] farm]
[[[%zer 0 %.n] [%boom ~]] ski]
--
++ till
=| burg=town
|= =farm
^- town
=/ work (flop (skip wood.farm ~(has in ~(key by burg))))
=< burg
|-
^- _this
?: =(~ work) this
=^ next work work
=/ work (flop (skip wood.farm ~(has in ~(key by land.burg))))
|- ^+ burg
?~ work burg
=/ next i.work
=+ ~| %next-miss (~(got by yard.farm) next)
:: now we have the nock-- in does
=/ dock [lamb=lamb.burg lake=*lake]
=| flow=line
=/ axle=@ 1
=/ fawn=does
=+
=<
|-
^- [[hat=sans her=berm] dock]
?- fawn
[%par * *]
=^ [one two her] dock twin
=^ [bat bit] dock $(fawn +>.fawn, axle (peg axle 3), flow [%dab her two])
=^ [hat hit] dock $(fawn +<.fawn, axle (peg axle 2), flow [%dab bit one])
(copy hat bat hit)
::
[%zer *]
?- flow
[%moat *]
=/ fawn does
=- =. lamb.burg lamb.dock
=. land.burg
%+ ~(put by land.burg) next
:_ says
:- (~(put by lake.dock) ~ [~ %hop her])
|- ^- (list @)
?- -.hat
%fork (weld $(hat left.hat) $(hat rite.hat))
%tine [+.hat]~
%disc ~
==
$(work t.work)
|^ ^- [[hat=plow her=berm] dock=_dock]
?- fawn
[%par * *]
=^ [one=plow two=plow her=berm] dock twin
=^ [bat=plow bit=berm] dock
$(fawn +>.fawn, axle (peg axle 3), flow [%moat her two])
=^ [hat=plow hit=berm] dock
$(fawn +<.fawn, axle (peg axle 2), flow [%moat bit one])
(copy hat bat hit)
::
[%zer *]
?- -.flow
%moat
=/ slow (take +<.fawn what.flow +>.fawn)
?~ slow
=^ hole dock bomb
:_ dock
[[%disc ~] hole]
fail
:_ dock
[u.slow wher.flow]
::
[%one *]
(bang +.fawn)
::
[%two *]
~| %todo !!
::
::
%rift
=^ miff dock wean
=/ slow (take +<.fawn [%tine miff] +>.fawn)
?~ slow
fail
=^ her dock (mend %miff ~ [%brn miff [troo fals]:flow])
:_ dock
[u.slow her]
::
%pond
=^ tend dock wean
=/ slow (take +<.fawn [%tine tend] +>.fawn)
?~ slow
fail
=^ her dock (mend %tend ~ [%don tend])
:_ dock
[u.slow her]
==
|%
++ bang
|= non=*
^- [[hat=plow her=berm] _dock]
?- flow
[%pond ~]
=^ ret dock wean
=^ her dock (mend %rime ~[[%imm +.fawn ret]] [%don ret])
:_ dock
[[%disc ~] her]
::
[%rift *]
?: =(0 +.fawn) [[[%disc ~] troo.flow] dock]
?: =(1 +.fawn) [[[%disc ~] fals.flow] dock]
=^ hole dock bomb :: XX maybe we should assert that SKA should have caught this?
:_ dock
[[%disc ~] hole]
::
[%moat *]
=/ what what.flow
=/ mitt
|-
^- (unit (list bran))
?- what
[%disc ~]
(some ~)
::
[%tine @]
(some ~[[%imm non +.what]])
::
[%fork *]
?@ non
?: safe.what
~| %safe-axis-atom !!
~
(clap $(what left.what, non -.non) $(what rite.what, non +.non) weld)
==
?~ mitt
=^ hole dock bomb
:_ dock
[[%disc ~] hole]
=^ rock dock (mend %toil u.mitt [%hop wher.flow])
:_ dock
[[%disc ~] rock]
::
[%one *]
(bang +.fawn)
::
[%two *]
~| %todo !!
::
[%thr *]
?- -.flow
%moat
?- -.what.flow
%fork fail
%disc $(fawn +.fawn, axle (peg axle 3))
%tine
=^ pear dock (mend %pear [%imm 0 +.what.flow]~ [%hop wher.flow])
=^ bock dock (mend %bock [%imm 1 +.what.flow]~ [%hop wher.flow])
=^ noon dock wean
=^ keck dock (mend %keck ~ [%clq noon pear bock])
$(fawn +.fawn, axle (peg axle 3), flow [%moat keck [%tine noon]])
==
++ take :: axis
|= [sax=@ tow=plow row=?] :: axis, destination, safety
^- plow :: nullary case = crash
?: =(0 sax) ~
%- some
|-
?: =(1 sax) tow
?- (cap sax)
%2 [%fork $(sax (mas sax)) [%disc ~] row]
%3 [%fork [%disc ~] $(sax (mas sax)) row]
==
++ milk :: local label
|= gen=@
^- berm
[sub.does for.does axle gen]
++ wean :: fresh ssa
^- [@ _dock]
[lamb.dock dock(lamb .+(lamb.dock))]
++ copy :: replicate values to two destinations
|= [hat=plow bat=plow her=berm]
^- [[hat=plow her=berm] _dock]
=^ [tog moot] dock
|-
^- [[tog=plow moot=(list tins)] _dock]
?: ?=([%disc ~] hat) [[bat ~] dock]
?: ?=([%disc ~] bat) [[hat ~] dock]
?- hat
::
%rift
=^ noon dock wean
=^ keck dock (mend %keck ~ [%clq noon [troo fals]:flow])
$(fawn +.fawn, axle (peg axle 3), flow [%moat keck [%tine noon]])
::
%pond
=^ tend dock wean
=^ pear dock (mend %pear [%imm 0 tend]~ [%don tend])
=^ bock dock (mend %bock [%imm 1 tend]~ [%don tend])
=^ noon dock wean
=^ keck dock (mend %keck ~ [%clq noon pear bock])
$(fawn +.fawn, axle (peg axle 3), flow [%moat keck [%tine noon]])
==
::
[%sev *]
=^ [hit=plow his=berm] dock $(fawn +>.fawn, axle (peg axle 7))
$(fawn +<.fawn, axle (peg axle 6), flow [%moat his hit])
::
*
~| %todo !!
==
++ fail
^- [[hat=plow her=berm] dock=_dock]
=^ hole dock bomb
:_ dock
[[%disc ~] hole]
++ bang
|= non=*
^- [[hat=plow her=berm] _dock]
?- flow
[%pond ~]
=^ ret dock wean
=^ her dock (mend %rime ~[[%imm +.fawn ret]] [%don ret])
:_ dock
[[%disc ~] her]
::
[%rift *]
?: =(0 +.fawn) [[[%disc ~] troo.flow] dock]
?: =(1 +.fawn) [[[%disc ~] fals.flow] dock]
:: XX maybe we should assert that SKA should have caught this?
=^ hole dock bomb
:_ dock
[[%disc ~] hole]
::
[%moat *]
=/ what what.flow
=/ mitt
|- ^- (unit (list bran))
?- what
[%disc ~]
(some ~)
::
[%tine @]
?- bat
[%tine @]
?: =(+.hat +.bat)
[[hat ~] dock]
[[hat ~[[%mov +.hat +.bat]]] dock]
::
[%fork *]
=^ one dock wean
=^ two dock wean
=^ [hog hoot] dock $(hat [%tine one], bat hed.bat)
=^ [log loot] dock $(hat [%tine two], bat tal.bat)
[[[%fork hog log safe.bat] [[%con one two +.hat] (weld hoot loot)]] dock]
==
::
(some ~[[%imm non +.what]])
::
[%fork *]
?- bat
[%tine @]
=^ one dock wean
=^ two dock wean
=^ [hog hoot] dock $(hat hed.hat, bat [%ssa one])
=^ [log loot] dock $(hat tal.hat, bat [%ssa two])
[[[%fork hog log safe.hat] [[%con one two +.bat] (weld hoot loot)]] dock]
::
[%fork *]
=^ [hog hoot] dock $(hat hed.hat, bat hed.bat)
=^ [log loot] dock $(hat tal.hat, bat tal.bat)
[[%fork hog log ?&(safe.hat safe.bat)] (weld hoot loot)] dock]
==
?@ non
?: safe.what
~| %safe-axis-atom !!
~
(clap $(what left.what, non -.non) $(what rite.what, non +.non) weld)
==
=/ blab (milk %copy)
:_ dock(pond (~(put by pond) blab [moot %hop her]))
[tog blab]
++ twin :: split sans from flow
^- [[plow plow berm] _dock]
?- flow
[%rift *]
?~ mitt
=^ hole dock bomb
:_ dock
[[%disc ~] [%disc ~] hole]
::
[%pond ~]
=^ one dock wean
=^ two dock wean
=^ ret dock wean
=^ her dock (mend %taco ~[[%con one two ret]] [%don ret])
:_ dock
[[%tine one] [%tine two] her]
::
[%moat *]
?- what.flow
[%fork *]
:_ dock
[left.what.flow rite.what.flow wher.flow]
::
[%disc ~]
:_ dock
[[%disc ~] [%disc ~] wher.flow]
[[%disc ~] hole]
=^ rock dock (mend %toil u.mitt [%hop wher.flow])
:_ dock
[[%disc ~] rock]
==
++ take :: axis
|= [sax=@ tow=plow row=?] :: axis, destination, safety
^- (unit plow) :: nullary case = crash
?: =(0 sax) ~
%- some
|- ^- plow
?: =(1 sax) tow
?- (cap sax)
%2 [%fork $(sax (mas sax)) [%disc ~] row]
%3 [%fork [%disc ~] $(sax (mas sax)) row]
==
++ milk :: local label
|= gen=@
^- berm
~! next
[sub.next for.next axle gen]
++ wean :: fresh ssa
^- [@ _dock]
[lamb.dock dock(lamb .+(lamb.dock))]
++ copy :: replicate values to two destinations
|= [hat=plow bat=plow her=berm]
^- [[hat=plow her=berm] _dock]
=^ [tog=plow moot=(list bran)] dock
|-
^- [[tog=plow moot=(list bran)] _dock]
?: ?=([%disc ~] hat) [[bat ~] dock]
?: ?=([%disc ~] bat) [[hat ~] dock]
?- hat
[%tine @]
?- bat
[%tine @]
:_ dock
?: =(+.hat +.bat)
[[hat ~] dock]
[[hat ~[[%mov +.hat +.bat]]] dock]
::
[%fork *]
=^ one dock wean
=^ two dock wean
=^ her dock (mend %cons ~[[%con one two +.what.flow]] [%hop wher.flow])
=^ [hog=plow hoot=(list bran)] dock
$(hat [%tine one], bat left.bat)
=^ [log=plow loot=(list bran)] dock
$(hat [%tine two], bat rite.bat)
:_ dock
[[%tine one] [%tine two] her]
:- ^- plow
[%fork hog log safe.bat]
[`bran`[%con one two +.hat] (weld hoot loot)]
==
::
[%fork *]
?- bat
[%tine @]
=^ one dock wean
=^ two dock wean
=^ [hog=plow hoot=(list bran)] dock
$(hat left.hat, bat [%tine one])
=^ [log=plow loot=(list bran)] dock
$(hat rite.hat, bat [%tine two])
:_ dock
[[%fork hog log safe.hat] [%con one two +.bat] (weld hoot loot)]
::
[%fork *]
=^ [hog=plow hoot=(list bran)] dock $(hat left.hat, bat left.bat)
=^ [log=plow loot=(list bran)] dock $(hat rite.hat, bat rite.bat)
:_ dock
[[%fork hog log ?&(safe.hat safe.bat)] (weld hoot loot)]
==
==
++ mend
|= [gen=@ =lock]
^- [berm _dock]
=/ curb (milk gen)
:- curb
dock(pond (~(put by pond.dock) berm lock))
++ bomb
^- [berm _dock]
(mend %boom ~ [%bom ~])
--
=/ blab (milk %copy)
:_ dock(lake (~(put by lake.dock) `blab [moot %hop her]))
[tog blab]
++ twin :: split sans from flow
^- [[plow plow berm] _dock]
?- flow
[%rift *]
=^ hole dock bomb
:_ dock
[[%disc ~] [%disc ~] hole]
::
[%pond ~]
=^ one dock wean
=^ two dock wean
=^ ret dock wean
=^ her dock (mend %taco ~[[%con one two ret]] [%don ret])
:_ dock
[[%tine one] [%tine two] her]
::
[%moat *]
?- what.flow
[%fork *]
:_ dock
[left.what.flow rite.what.flow wher.flow]
::
[%disc ~]
:_ dock
[[%disc ~] [%disc ~] wher.flow]
::
[%tine @]
=^ one dock wean
=^ two dock wean
=^ her dock
(mend %cons ~[[%con one two +.what.flow]] [%hop wher.flow])
:_ dock
[[%tine one] [%tine two] her]
==
==
++ mend
|= [gen=@ =lock]
^- [berm _dock]
=/ curb (milk gen)
:- curb
dock(lake (~(put by lake.dock) `curb lock))
++ bomb
^- [berm _dock]
(mend %boom ~ [%bom ~])
--
--

View File

@ -3,7 +3,7 @@
:: Split an axis into a sock into safe and unsafe components
++ punt
|= [axe=@ =sock]
^- [@ @ sock]
^- [@ @ ^sock]
?: =(0 axe)
[0 0 %toss ~]
=/ saf 1
@ -30,7 +30,7 @@
++ pull
|= arg=[@ sock]
^- boot
=/ [saf rik ken] (punt arg)
=+ [saf rik ken]=(punt arg)
?: =(0 saf) [%boom ~]
?: =(1 rik) [%safe ken]
[%risk ken]

View File

@ -3,6 +3,7 @@
+| %ska
+$ barn [sub=sock for=*]
+$ nomm :: SKA-analyzed nock
$~ [%one **]
$% [%par nomm nomm]
[%zer @ ?] :: safety-tagged lookup
[%one *]