Breach compatibility rc1

This commit is contained in:
Anton Dyudin 2015-01-17 17:31:45 -08:00
parent 5f1fcad714
commit a6f0a91cad
2 changed files with 31 additions and 2 deletions

View File

@ -10,8 +10,7 @@
::
|% ::
++ axle ::
$: %0 :: version
tiv=? :: typing?
$: tiv=? :: typing?
pid=@u :: next process id
pax=_`path`/=try= :: working directory
act=(unit span) :: active child

View File

@ -58,6 +58,36 @@
[%vega p=path] ::
== == ==
--
::
:::: from future import wick, pack, pick XX remove on breach or kelvin bump
::
|%
++ wick :: span format
|= a=@
^- (unit ,@ta)
=+ b=(rip 3 a)
=- ?^(b ~ (some (rap 3 (flop c))))
=| c=tape
|- ^- [b=tape c=tape]
?~ b [~ c]
?. =('~' i.b)
$(b t.b, c [i.b c])
?~ t.b [b ~]
?- i.t.b
%'~' $(b t.t.b, c ['~' c])
%'-' $(b t.t.b, c ['_' c])
@ [b ~]
==
::
++ pack :: light path encoding
|= [a=term b=path] ^- span
%+ rap 3 :- (wack a)
(turn b |=(c=span (cat 3 '_' (wack c))))
::
++ pick :: light path decoding
|= a=span ^- (unit ,[p=term q=path])
(rush a (most cab (sear wick urt:ab)))
--
!:
:::: helpers
::