Re: negate and sections

2000-06-01 Thread Marcin 'Qrczak' Kowalczyk
Thu, 01 Jun 2000 09:27:05 -0700, Jeffrey R. Lewis <[EMAIL PROTECTED]> pisze: > BTW, `subtract' doesn't really help, since it's also asymmetrical > - there's no corresponding `add'. I had a piece of code where > one case was adding x, and the other was subtracting it. I was > simply grumbling th

Re: negate and sections

2000-06-01 Thread Jeffrey R. Lewis
Zhanyong Wan wrote: > "Jeffrey R. Lewis" wrote: > > > Jan Skibinski wrote: > > > > > On Thu, 1 Jun 2000, Jeffrey R. Lewis wrote: > > > > > > > No so, of course. (- x) means `negate x'. Bummer. What an unpleasant bit of > > > > asymmetry! > > > > > > How about ((-) x) ? > > > > That, re

Re: negate and sections

2000-06-01 Thread Rob MacAulay
Date sent: Thu, 01 Jun 2000 08:47:23 -0700 From: "Jeffrey R. Lewis" <[EMAIL PROTECTED]> Organization: Galois Connections To: Jan Skibinski <[EMAIL PROTECTED]> Copies to: [EMAIL PROTECTED] Subject:

Re: negate and sections

2000-06-01 Thread Robert Jeschofnik
On 01-Jun-2000, Jeffrey R. Lewis <[EMAIL PROTECTED]> wrote: > You can write the section (+ x) to specify a function to add `x' to > something. That's great, then you need to specify a function for subtracting > `x' from something. Great, you just type in: (- x), and you're done, right? > > No

RE: negate and sections

2000-06-01 Thread Mark P Jones
Hi Jeff, | You can write the section (+ x) to specify a function to add `x' to | something. That's great, then you need to specify a function for | subtracting `x' from something. This is why the "subtract" function is included in the Prelude: Prelude> map (subtract 1) [1..10] [0,1,2,3

Re: negate and sections

2000-06-01 Thread Zhanyong Wan
"Jeffrey R. Lewis" wrote: > Jan Skibinski wrote: > > > On Thu, 1 Jun 2000, Jeffrey R. Lewis wrote: > > > > > No so, of course. (- x) means `negate x'. Bummer. What an unpleasant bit of > > > asymmetry! > > > > How about ((-) x) ? > > That, regrettably, is the wrong function. That func

Re: negate and sections

2000-06-01 Thread Jeffrey R. Lewis
Jan Skibinski wrote: > On Thu, 1 Jun 2000, Jeffrey R. Lewis wrote: > > > No so, of course. (- x) means `negate x'. Bummer. What an unpleasant bit of > > asymmetry! > > How about ((-) x) ? That, regrettably, is the wrong function. That function is \y -> x - y. I wanted \y -> y - x.

Re: negate and sections

2000-06-01 Thread Jan Skibinski
On Thu, 1 Jun 2000, Jeffrey R. Lewis wrote: > No so, of course. (- x) means `negate x'. Bummer. What an unpleasant bit of > asymmetry! How about ((-) x) ? Jan