marcomaggi / vicare

A native compiler for Scheme compliant with R6RS
http://marcomaggi.github.com/vicare.html
Other
200 stars 34 forks source link

(bitwise-ior) and (bitwise-xor) should both be zero #52

Closed weinholt closed 11 years ago

weinholt commented 11 years ago

When bitwise-ior or bitwise-xor is called with zero arguments they should return 0, which acts as identity for these procedures. The example below should return 42:

Vicare Scheme version 0.3d1, 64-bit Revision devel/eb362bf709a6d7d0da3bcfdf4c126ea6898137c1 Build 2013-08-20

Copyright (c) 2006-2010 Abdulaziz Ghuloum and contributors Copyright (c) 2011-2013 Marco Maggi

vicare> (define (identity x) (bitwise-ior x (bitwise-ior))) vicare> (identity 42) $1 = -1

marcomaggi commented 11 years ago

Thanks. This should be fixed in the head of the devel branch.