Will 33137706c2 pattern matcher | 3 månader sedan | |
---|---|---|
.. | ||
README.org | 3 månader sedan | |
ktour.txt | 3 månader sedan | |
tutorial.k | 3 månader sedan |
This tutorial runner can be used to make simple guides through ngn/k functionality. It takes a script with executable code and comments and prints the code/comments line by line with lines being advanced by hitting return.
If instead of return some code is typed by the user then that code is executed offering an opportunity for a more interactive experience.
When run from the command line, this simply takes a list scripts to be run.
$ k tutorial.k ktour.txt 1 + 1 / basic arithematic can be done with infix notation 2 5 * 7 35 2 - 4 -2 9-8 // <--- this is me typing, and then continuing 1 3 % 2 / division is done with % since / serves other purposes like the beginning of a comment! :D 1.5
This was written after trying a few of the excellent tutorials on the J app for the J language.