I'm pretty sure they are both wrong. The problem is that range checks are missing and so succ(true) produces bool(2). It's an old and somewhat unresolved issue because proper range checks prevents code like for x in false..true from working. (Think about it.) There is of course a way to make it work but this results in an unacceptable performance overhead.