home *** CD-ROM | disk | FTP | other *** search
- From: jensk@hpbbn.bbn.hp.com (Jens Kilian)
- Date: Sat, 19 Dec 1992 00:23:40 GMT
- Subject: Re: next_to code question
- Message-ID: <JENSK.92Dec18172340@hpbeo82.bbn.hp.com>
- Organization: HP
- Path: sparky!uunet!spool.mu.edu!sdd.hp.com!hpscit.sc.hp.com!hplextra!hpcc05!hpbbn!hpbeo20!jensk
- Newsgroups: comp.lang.prolog
- References: <1992Dec17.204918.6730@mercury.cair.du.edu>
- Sender: news@hpbeo20.bbn.hp.com (News System)
- In-Reply-To: awinterb@diana.cair.du.edu's message of Thu, 17 Dec 1992 20:49:18 GMT
- Lines: 21
-
-
- > append([],L,L) :- !.
- ^
- This cut is the culprit.
-
- It makes append/3 determinate, so it won't be able to deliver multiple
- solutions.
-
- Just replace the first clause by
-
- append([], L, L).
-
-
- Jens.
- --
- Internet: jensk@hpbeo82.bbn.hp.com HPDESK : JENS_KILIAN%XU@HP1200
- MausNet: Jens Kilian @ BB KILIAN_JENS/HP1200_XU@hpbbi4
- Phone: (0|+49)7031-14-4308 TELNET : 778-4308
- Fax : (0|+49)7031-14-2049
- -------------------------------------------------------------------------------
- As the air to a bird, or the sea to a fish, so is contempt to the contemptible.
-