Skip to content

Instantly share code, notes, and snippets.

@urcades
Created July 29, 2019 17:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save urcades/6c2cb3dbf7eda654a1458ac5ce988d5a to your computer and use it in GitHub Desktop.
Save urcades/6c2cb3dbf7eda654a1458ac5ce988d5a to your computer and use it in GitHub Desktop.
Hoon 101 Assignment 3B
:: I managed to figure out how to get a simple
:: atom-only list checker running, but I struggled
:: to figure out how to get strings rendered as their
:: initial textual aura instead of @ud-type output
::
:: I was curious why I needed to use '2' as my count
:: number, as other examples I saw in the tutorial (snag.hoon)
:: allowed the user to specify their "selection point
:: and have it represented in the output just fine, i.e:
:: using an input of "3" in snag.hoon would actually get the third list item.
|= n=(list @)
=/ a=@ud 2
|-
?~ n !!
?: =(0 a) i.n
$(a (dec a), n t.n)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment