Code in documentation for Assert may not show the correct outputs
AlexDikelsky opened this issue · comments
Alex Dikelsky commented
In the section on assert with a left argument, the output doesn't look quite right. The codeblock
"Message" ! 0
ERROR
⟨∘,"abc",˜⟩ ! '0' # Okay this is not a very helpful printout
ERROR
doesn't produce the same output when you run it in the online REPL, which makes sense since it stops execution after the first failed assertion, but I think the output ERROR
might not be right. Could we split the asserts into two code blocks, then change ERROR
to the result in the online REPL or CBQN?
Marshall Lochbaum commented
It's not technically possible yet because there's no way to read the error message from within BQN. I'll change the evaluator (here) when we add a system function to do that.