Relative Content

Tag Archive for schemeracket

Why does Racket output 1 for (and 0 1)?

As the title asks, why does Racket output a 1 for a logical and between 0 1? The interesting this here is that the same operation but flipped positions of 0 and 1 give the proper output of 0. I’m no Racket/Scheme expert, but shouldn’t a logical and of 0 1 return 0 or #f in Racket?