urbit/main/bin/ticket.hoon

28 lines
599 B
Plaintext
Raw Normal View History

2013-09-29 00:21:18 +04:00
!:
:: /=main=/bin/ticket/hoon
::
=> .(-< `who=@p`-<)
|= [est=time *]
|= arg=*
^- bowl
:_ ~
=+ ^= fir ^- [p=@p q=@ud]
?: ?=([@ ~] arg)
[-.arg 1]
?: ?=([@ @ ~] arg)
[-.arg +<.arg]
~|(%ticket-arg !!)
2013-10-08 22:26:59 +04:00
?> =(who (sein p.fir))
2013-09-29 00:21:18 +04:00
=+ ^= 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))