week4
Dieser Commit ist enthalten in:
Ursprung
016dc8728d
Commit
d3b9e34ed4
40
week4/week4.hoon
Normale Datei
40
week4/week4.hoon
Normale Datei
@ -0,0 +1,40 @@
|
||||
:: Hoon 101 - Week 4
|
||||
:: ~bannum-magtus || s@p7.co.nz
|
||||
::
|
||||
|= n=@
|
||||
^- @
|
||||
=< (wrrrm n)
|
||||
|%
|
||||
::
|
||||
:: the atom made a 'clink' as it fell into the hole
|
||||
++ clink
|
||||
|= [a=@ b=@]
|
||||
^- ?
|
||||
=(0 (mod a b))
|
||||
::
|
||||
:: there was a 'clunk' as the atom fell multiple times
|
||||
++ clunk
|
||||
|= a=@
|
||||
^- ?
|
||||
?|
|
||||
(clink a 3)
|
||||
(clink a 5)
|
||||
==
|
||||
::
|
||||
:: a 'bzzrp' was heard as certain atoms were vapourised
|
||||
++ bzzrp
|
||||
|= a=@
|
||||
?: (clunk a)
|
||||
a
|
||||
0
|
||||
::
|
||||
:: 'wrrrm' was all you could hear as the machine started up
|
||||
++ wrrrm
|
||||
|= x=@
|
||||
^- @
|
||||
%- roll
|
||||
:_ add
|
||||
%- turn
|
||||
:_ bzzrp
|
||||
(gulf 1 x)
|
||||
--
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren