[CS3304_1381] Help with cut

New Message Reply About this list Date view Thread view Subject view Author view

Mark Hinkle (mhinkle@VT.EDU)
Tue, 25 Apr 2000 00:46:15 -0400


Message-ID:  <Pine.LNX.4.21.0004250041450.2423-100000@localhost.localdomain>
Date:         Tue, 25 Apr 2000 00:46:15 -0400
From: Mark Hinkle <mhinkle@VT.EDU>
Subject:      [CS3304_1381] Help with cut

How can I slim down the answers I get returned from a predicate to 1? For
example, term([2,times,3,times,4],N). returns all of
N = [24|1] ;
N = [[24|1], 1] ;
N = [[24|1], []] ;
N = [6|1] ;
N = [[6|1], 1] ;
N = [[6|1], [times, 4]] ;
N = [2|1] ;
N = [[2|1], [times, 3, times, 4]] ;

I just want the first answer. I'm pretty sure I need to use cut(!) but
the all documentation I've been able to find on its use is pretty
slim. Has anyone used it successfully, and could you please post a crash
course on it?

Thanks,
Mark


New Message Reply About this list Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b3 on Tue Apr 25 2000 - 00:44:09 EDT