june / A basic for-each/fold pattern.
0 лайк(-ов)
0 форк(-ов)
1 файл(-ов)
Последняя активность 3 months ago
| 1 | ||:@include: lib/rpn.nv |
| 2 | |
| 3 | |:: push $x to $y| |
| 4 | :stacks: $y $x |
| 5 | |:: pop from $x :stacks: $x $y| |
| 6 | :item: $y |
| 7 | |:: pop from $x? :stacks: $y $z| |
| 8 | :seen: $y $z |
| 9 | |:: pop from $x| |
| 10 | :stack empty: $x |
june / A formatting print rule-set.
0 лайк(-ов)
0 форк(-ов)
1 файл(-ов)
Последняя активность 4 months ago
Supports custom formatting by adding additional rules. (Runs in Serpens.)
| 1 | |:: print? :string: '%d'| :: print a number |
| 2 | |:: print? :string: '%b'| :: print a number :base: 2 |
| 3 | |:: print? :string: '%x'| :: print a number :base: 16 |
| 4 | |:: print? :string: '%s'| :: print a string |
| 5 | |:: print? :string: '{}'| :: print an argument |
| 6 | |:: print? :string: '\n'| :string: 10 |
| 7 | |:: print? :string: '\t'| :string: 9 |
| 8 | |:: print? :string: '\r'| :string: 13 |
| 9 | |:: print? :string: '\0'| :string: 0 |
| 10 | |:: print? :string: $ | :@stdio: write $ |
june / A simple search algorithm.
0 лайк(-ов)
0 форк(-ов)
1 файл(-ов)
Последняя активность 4 months ago
It eats whatever you pass into it.
| 1 | |:search for: $something :collection: $something| |
| 2 | :found: $something |
| 3 | |:search for: $something :collection: $something-else| |
| 4 | :search for: $something |
| 5 | |:search for: $something| |
| 6 | :not found: $something |
| 7 | |
| 8 | ||:search for: red |
| 9 | :collection: (green blue white orange red violet) |
capitalex / main.processor.wul
0 лайк(-ов)
0 форк(-ов)
4 файл(-ов)
Последняя активность 4 months ago
| 1 | { |
| 2 | @ make player at 100 100 |
| 3 | , move player by 20 50 |
| 4 | , @lamb pprint |
| 5 | } |
| 6 | |
| 7 | @processor @ ; |
| 8 | @ move player by $x $y { |
| 9 | @processor @ ; @process switch to @ewe ; |
| 10 | @ewe ( #player @ewe.peek move by $x $y 4 @lamb.invoke @ewe.done ) ; |