Re: ASSERT in SWI Prolog
- From: Nick Wedd <nick@xxxxxxxxxxxxx>
- Date: Wed, 16 Aug 2006 10:53:26 +0100
In message <ebrnrb$deo$1@xxxxxxxxxxxxxxxx>, russell kym horsell <kym@xxxxxxxxxxxxxxxxxxx> writes
Mika <miky821@xxxxxxxx> wrote:I want to know if this can be made in SWI Prolog.
OK. The answer is "yes".
The answer to the question "is it pretty?", is -- of course -- "no".
It's not that ugly. Use bagof to collect all the facts into a list, process the list to replace fact2 by fact6, retractall the facts, and then assert the facts in the list. Though I can't imagine why anyone would want to do this.
Nick
--
Nick Wedd nick@xxxxxxxxxxxxx
.
- Follow-Ups:
- Re: ASSERT in SWI Prolog
- From: Paul Singleton
- Re: ASSERT in SWI Prolog
- From: russell kym horsell
- Re: ASSERT in SWI Prolog
- References:
- ASSERT in SWI Prolog
- From: Mika
- Re: ASSERT in SWI Prolog
- From: A . L .
- Re: ASSERT in SWI Prolog
- From: Mika
- Re: ASSERT in SWI Prolog
- From: russell kym horsell
- ASSERT in SWI Prolog
- Prev by Date: Re: ASSERT in SWI Prolog
- Next by Date: Re: ASSERT in SWI Prolog
- Previous by thread: Re: ASSERT in SWI Prolog
- Next by thread: Re: ASSERT in SWI Prolog
- Index(es):