[racket] arity of + versus <=

From: Gregory Woodhouse (gregwoodhouse at me.com)
Date: Sun Oct 30 12:39:51 EDT 2011

Think about arithmetic mod 2. Multiplication is AND and addition is XOR. So the multiplicative identity 1 corresponds to TRUE. It just happens that the additive identity 0 works for OR, but that's not a perfect analog since 1 + 1 = 0 (2).

On Oct 28, 2011, at 9:55 AM, Carl Eastlund wrote:

> No.  I don't see any sense in which that's a generalization of cdr.
> In fact it's quite non-uniform; for instance, applying cdr to a
> non-empty list produces a list one shorter.  If we want to extend cdr
> to length 0 lists, we need to somehow produce a list of length -1.  We
> restrict cdr from empty lists precisely because it can't be
> generalized.  Or at least that's how I see it.
> 
> --Carl

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20111030/60204f8b/attachment.html>

Posted on the users mailing list.