Hello,
I may have encountered a possible bug, unless my understanding of @ is
incorrect. It appears the value of @ is not restored in a prog1 body when
another flow/logic statement occurs as the car of an expression within the
said prog1 body. In both cases, the correct result is returned from prog1.
Test Cases:
(let (A0 (1)
A1 (2 3)
A2 'x)
(prog1 (cdr A1)
((if (sym? A2) 'set 'con) A2 A0)
# Prints T when sym? result is T (incorrect)
# but prints (3) when sym? result is NIL (correct)
# Expect (3) printed regardless of sym? result
(println @)))
(let (A0 (1)
A1 (2 3)
A2 (4))
(prog1 (cdr A1)
((if (sym? A2) 'set 'con) A2 A0)
# Prints T when sym? result is T (incorrect)
# but prints (3) when sym? result is NIL (correct)
# Expect (3) printed regardless of sym? result
(println @)))
Thanks,
Kevin