Last active
October 23, 2023 03:11
-
-
Save narskidan/57ee9496be0b5400306b41b7fefc9288 to your computer and use it in GitHub Desktop.
Bunch of hoon toy problems
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|= n=tape | |
=/ index 0 | |
=/ found "" | |
=/ vowels "aeiou" | |
|- | |
?: =(index (lent vowels)) | |
found | |
=/ current (trip (snag index vowels)) | |
=/ added ?: =(~ (find current n)) | |
"" | |
current | |
%= $ | |
index +(index) | |
found (weld found added) | |
== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|= [l=(list)] | |
^- (list) | |
=/ i (dec (lent l)) | |
|- | |
=/ next ?:(=(i 0) ~ $(i (dec i))) | |
[(snag i l) next] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|= n=@ud | |
^- @ud | |
=/ a 0 | |
=/ b 1 | |
|- | |
?: =(n 0) | |
a | |
%= $ | |
a b | |
b (add a b) | |
n (dec n) | |
== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|= n=@ud | |
^- @ud | |
=/ b 1 | |
|- | |
?: .= n 1 | |
%- pow :- b 2 | |
%= $ | |
b (add 1 b) | |
n (dec n) | |
== |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment