weired bug

Tim Gahnström /Bladerman tim@bladerman.com
Sat, 21 Oct 2000 22:11:12 +0200


Hi
I dont know if this bug is of much interest to you since it aply to =
Version: September 1999.
If you are uninterested, just disregard from this mail.

On most hugs interpretators (which I have tries it on) the call

add 1 [0,0,1]

will return [1,0,1]
But on my instalation (both winhugs and the dos mode)
return  [0,1,1]

I dont have a clue why but here is the actual code.

The correct return is [1,0,1]


halvad (0,0) =3D (0,0)
halvad (1,0) =3D (0,1)
halvad (0,1) =3D (0,1)
halvad (1,1) =3D (1,0)

add 0 [] =3D []
add 1 [] =3D [1]
add carry (x:xs) =3D let (car,out) =3D halvad (carry,x) in
    (out:(add car xs))


Good luck and happy buggtraquing.

TIm Gahnstr=F6m