Below you will find pages that utilize the taxonomy term “hoon”
Posts
Iteration and Recursion in Hoon.
Code below is a part of Exercise: A Playing Card Library 1 section in Hoon School 7. Libraries.
++ shuffle-deck |= [unshuffled=deck entropy=@] ^- deck =/ shuffled *deck =/ random ~(. og entropy) =/ remaining (lent unshuffled) |- ?: =(remaining 1) :_ shuffled (snag 0 unshuffled) =^ index random (rads:random remaining) %= $ shuffled [(snag index unshuffled) shuffled] remaining (dec remaining) unshuffled (oust [index 1] unshuffled) == Notice that random card is selected from the following 2 lines.