From: Pete
Subject: Cut facility
Date: 
Message-ID: <380F9858.15BF6274@cajamurcia.es>
There exist a cut facility, like in Prolog ('!'), for Lisp?

From: Marco Antoniotti
Subject: Re: Cut facility
Date: 
Message-ID: <lwyacv4vvu.fsf@copernico.parades.rm.cnr.it>
Pete <·········@cajamurcia.es> writes:

> There exist a cut facility, like in Prolog ('!'), for Lisp?

The question is: why do you need the 'cut' oeration in Lisp?  :)

Cheers



-- 
Marco Antoniotti ===========================================
PARADES, Via San Pantaleo 66, I-00186 Rome, ITALY
tel. +39 - 06 68 10 03 17, fax. +39 - 06 68 80 79 26
http://www.parades.rm.cnr.it/~marcoxa
From: Stig Hemmer
Subject: Re: Cut facility
Date: 
Message-ID: <ekvg0z17vjm.fsf@gnoll.pvv.ntnu.no>
Pete <·········@cajamurcia.es> writes:
> There exist a cut facility, like in Prolog ('!'), for Lisp?

It is hard for me to see what the equivalent of cut would be in Lisp.

What do you want to do?

Stig Hemmer,
Jack of a Few Trades.
From: Barry Margolin
Subject: Re: Cut facility
Date: 
Message-ID: <d0SQ3.30$J44.1766@burlma1-snr2>
In article <···············@gnoll.pvv.ntnu.no>,
Stig Hemmer  <····@pvv.ntnu.no> wrote:
>Pete <·········@cajamurcia.es> writes:
>> There exist a cut facility, like in Prolog ('!'), for Lisp?
>
>It is hard for me to see what the equivalent of cut would be in Lisp.

The closest thing I can think of is RETURN.

-- 
Barry Margolin, ······@bbnplanet.com
GTE Internetworking, Powered by BBN, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.
From: Jim Driese
Subject: Re: Cut facility
Date: 
Message-ID: <3813F514.61294D38@seanet.com>
Pete wrote:

> There exist a cut facility, like in Prolog ('!'), for Lisp?

Only if you wish to implement Prolog in Lisp -- which is not as hard as
you might think.  Peter Norvig gives a lucid discussion of Prolog
interpreters and compilers in his book _Paradigms of Artificial
Intelligence:  Case Studies in Common Lisp_   Mr. Norvig is a brilliant
programmer -- he has written some of the best lisp code I have ever
seen.  The code is available on-line as well -- try
http://www.norvig.com.

You might also wish to look into Scheme continuations (call/cc or
call-with-current-continuation) which can be used to implement
non-determinism as well.

Regards,

Jim Driese