mirror of
https://github.com/urbit/shrub.git
synced 2024-12-14 11:08:45 +03:00
28 lines
599 B
Plaintext
28 lines
599 B
Plaintext
!:
|
|
:: /=main=/bin/ticket/hoon
|
|
::
|
|
=> .(-< `who=@p`-<)
|
|
|= [est=time *]
|
|
|= arg=*
|
|
^- bowl
|
|
:_ ~
|
|
=+ ^= fir ^- [p=@p q=@ud]
|
|
?: ?=([@ ~] arg)
|
|
[-.arg 1]
|
|
?: ?=([@ @ ~] arg)
|
|
[-.arg +<.arg]
|
|
~|(%ticket-arg !!)
|
|
?> =(who (sein p.fir))
|
|
=+ ^= sep ^- @
|
|
=+ mir=(clan p.fir)
|
|
?+ mir ~|(%ticket-clan !!)
|
|
%king (bex 8)
|
|
%duke (bex 16)
|
|
%earl (bex 32)
|
|
==
|
|
|- ^- (list gift)
|
|
?: =(0 q.fir) ~
|
|
=+ tic=(,@p .^(%a (scot %p who) %tick (scot %da est) (scot %p p.fir) ~))
|
|
:- [%la %leaf "{<p.fir>}: {<tic>}"]
|
|
$(p.fir (add sep p.fir), q.fir (dec q.fir))
|