~subsetpark/ec

b162ab6ae1f8a600824c9acb032daf473dfafad3 — Zach Smith 8 months ago f2085e0
Reverse if
1 files changed, 4 insertions(+), 4 deletions(-)

M src/adverbs.janet
M src/adverbs.janet => src/adverbs.janet +4 -4
@@ 156,13 156,13 @@

(defadv if 3
  ```
  qt qf p -- x
  p qt qf -- x
  If `p` = 0, applies `qf`.
     else applies `qt`.
  ```
  (let [p (calc/pop stack)
        qf (calc/pop stack)
        qt (calc/pop stack)]
  (let [qf (calc/pop stack)
        qt (calc/pop stack)
        p (calc/pop stack)]
    (case (p :value)
      0 (do-apply stack qf)
      (do-apply stack qt))))