[prev in list] [next in list] [prev in thread] [next in thread] 

List:       racket-users
Subject:    [racket] arity of + versus <=
From:       gregwoodhouse () me ! com (Gregory Woodhouse)
Date:       2011-10-30 16:39:51
Message-ID: 11C793EC-31AD-4B96-A3A6-02E393057B39 () me ! com
[Download RAW message or body]

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>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic