~subsetpark/ec

44351a16f5df24d3489ee0f6084204e43d034d78 — Zach Smith 7 months ago a70af9c
Update README
3 files changed, 5 insertions(+), 5 deletions(-)

M README.md
M src/env.janet
M src/operations.janet
M README.md => README.md +2 -3
@@ 7,7 7,7 @@ An RPN calculator with array operations and quotations.
<> $ [3 4 5] 6 x
<[18 24 30]> $ 0 swap
<[18 24 30]> $ (+) /
<72> $ p
<72> $ .
72
<> 
```


@@ 79,7 79,7 @@ An RPN calculator with array operations and quotations.
   To get a description of any word, quote it and use the
   special command. eg.,

       (!) ?
       (i) ?

   Will print a description of the `apply` adverb.



@@ 100,4 100,3 @@ $ cp build/ec <somewhere on your path>
```

[Janet]: https://janet-lang.org


M src/env.janet => src/env.janet +1 -0
@@ 23,6 23,7 @@
                  # Combinators
                  "each" adverbs/do-each
                  "dist" adverbs/dist
                  "/" adverbs/dist
                  "apply" adverbs/apply-quotation
                  "i" adverbs/apply-quotation
                  "if" adverbs/if

M src/operations.janet => src/operations.janet +2 -2
@@ 29,13 29,13 @@
  ~(defop ,name ,arity
     (fn [x y] (if (,cmp x y) 1 0))
     (string/format
       `
      `
      x y -- bool
      Comparison predicate.
      Push 1 if x %s y;
             else 0.
      `
       ,(string cmp))))
      ,(string cmp))))

(defcmp lt 2 <)
(defcmp gt 2 >)