Skip to content

Latest commit

 

History

History
57 lines (37 loc) · 897 Bytes

File metadata and controls

57 lines (37 loc) · 897 Bytes

rpn

A Reverse Polish notation calculator implemented with Deno and TypeScript.

CI

Running

Install the Deno runtime 1.0 or newer. Once installed, run the following command:

deno run cli.ts 1 2 +

Or to start the REPL:

deno run cli.ts

Install as script

You can install it as a shell script running the command:

deno install -n rpn cli.ts

Then, you can use it directly:

rpn 1 2 +

Usage

USAGE:

  rpn                    Start the REPL
  rpn [expression]       Evaluate an one-line expression
  rpn --help             Print the help message

EXAMPLES:

  rpn                    => Start the REPL
  rpn 1 2 + 3 + 4 +      => 10
  rpn pi round           => 3

Tests

Run the tests with the following command:

deno test