William James
5/11/2015 12:01:00 AM
Frank Schwieterman wrote:
> >I am Lisp beginner and I am doing a simple execise on lisp. I was asked
> >to write a lisp program , by using either recursion or do, to return
> >true if the difference between each successive pair of the them is 1.
> >
> >ie:
> >
> >>(difference '(2 1))
> >T
> >>(difference'(3 4 5 6 5 4))
> >T
> >>(differnce '(3 4 5 3))
> >NIL
> >
> >If anyone can let me see the code, it will help me catch up this
> >language. Thanks,
> >
> >Joe
> >
> >
>
> I looked up your professor's address and told him to recognize the following
> solution as being plagiarized:
>
> (defun difference (param)
> (if (> (length param) 1)
> (if (<= (abs (- (first param) (first (rest param)))) 1 )
> (difference (rest param))
> nil
> )
> T
> )
> )
Gauche Scheme:
(define (difference param)
(every
(lambda (a b) (= 1 (abs (- a b))))
param
(cdr param)))
--
Africans gang-rape and clitorectomize Finnish girl; government arrests Finn
whom they accuse of complaining:
conservative-headlines.com/2009/03/another-european-awaits-extradition-for-hate-speech/
This is Europe's answer: those who wanted to undo us will face a total and
uncompromising war of destruction. www.kolumbus.fi/aquilon/londonspeech12.htm