Phel REPL
Evaluate Phel expressions to verify behavior without writing test files.
Instructions
Take the expression from
$ARGUMENTS(or ask for one if empty).Evaluate it using the Phel CLI
evalcommand:timeout 10 ./bin/phel eval '$ARGUMENTS'Or read the expression from stdin with
-:echo '$ARGUMENTS' | timeout 10 ./bin/phel eval -For multi-form snippets that need a namespace, write a temp file:
echo '(ns repl-test) $ARGUMENTS' > /tmp/phel-repl-test.phel timeout 10 ./bin/phel run /tmp/phel-repl-test.phelReport the result. If there's an error, explain what went wrong.
Examples
/phel-repl (+ 1 2)
/phel-repl (map inc [1 2 3])
/phel-repl (defn greet [name] (str "Hello, " name "!"))