Closed LuKuangChen closed 3 years ago
Doc and implementation mismatch.
The smol/state writes
smol/state
(set-left! expr val) → Void expr : Pair val : Any
However, the implementation of set-left! and set-right! do not enforce this specification (expr : Pair):
set-left!
set-right!
expr : Pair
> (defvar v (mvec 1 2 3)) > (set-left! v 4) > v '#(4 2 3) > (set-right! v 5) > v '#(4 5 3) >
These two functions should check their arguments.
Doc and implementation mismatch.
The
smol/state
writesHowever, the implementation of
set-left!
andset-right!
do not enforce this specification (expr : Pair
):