Will 33137706c2 pattern matcher 4 bulan lalu
..
README.org 33137706c2 pattern matcher 4 bulan lalu
ktour.txt 33137706c2 pattern matcher 4 bulan lalu
tutorial.k 33137706c2 pattern matcher 4 bulan lalu

README.org

Simple tutorial runner

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.

API

When run from the command line, this simply takes a list scripts to be run.

Sample 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

Inspiration

This was written after trying a few of the excellent tutorials on the J app for the J language.