fork download
  1. (defn stack-operations [stack]
  2. "Actions to take if (nil? stmt)"
  3. (comment 'If a left paren is found on the stack, it means
  4. that there was no right paren to match it, and
  5. therefore the statement had unbalanced parentheses.')
  6. (cond (and (not (nil? stack))
  7. (= (first stack) \()) (print "Unbalanced parentheses.\n")
  8. (nil? stack) '()
  9. :else (cons (first stack) (%shunting-yard '() (rest stack)))))
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty