Re: Modulo

2008-12-29 Thread Rich Hickey
On Dec 29, 7:50 am, Achim Passen wrote: > Hi! > > I uploaded my attempt at this to the files section of this group: >http://clojure.googlegroups.com/web/mod-sgn.diff > > It adds the modulus operator plus, as a by-product, the signum > operator (sgn). > > Comments most welcome! > Thanks! Co

Re: Modulo

2008-12-29 Thread Achim Passen
Hi! I uploaded my attempt at this to the files section of this group: http://clojure.googlegroups.com/web/mod-sgn.diff It adds the modulus operator plus, as a by-product, the signum operator (sgn). Comments most welcome! Kind regards, achim On 29 Dez., 07:01, Rich Hickey wrote: > On Dec

Re: Modulo

2008-12-28 Thread Vincent Foley
I suppose then that we would also need div. Using GHCi here: Prelude> (-3) `div` 2 -2 Prelude> (-3) `quot` 2 -1 On Dec 22, 7:04 am, "Mark Engelberg" wrote: > Anyone know why there is no modulo or mod function in Clojure's core? > I know there is a rem function, but that's not the same thing.

Re: Modulo

2008-12-28 Thread Rich Hickey
On Dec 29, 12:44 am, "Mark Engelberg" wrote: > So I understand that we're supposed to discuss ideas here to try to > gain "mindshare" which is why last week I brought up the issue with > Clojure missing mod (which works differently from rem on negative > numbers). So really, no one else cares

Re: Modulo

2008-12-28 Thread Mark Engelberg
So I understand that we're supposed to discuss ideas here to try to gain "mindshare" which is why last week I brought up the issue with Clojure missing mod (which works differently from rem on negative numbers). So really, no one else cares about this, or was the post just lost in the shuffle of