A newbe wants to know what this mean..
- From: Snaggy <l.cioria@xxxxxxxxx>
- Date: Fri, 31 Aug 2007 17:47:23 -0000
bubble_sort(Xs, Ys):-
append(Ws, [A,B|Zs], Xs),
B < A,
append(Ws, [B,A|Zs], Vs), !,
bubble_sort(Vs, Ys).
bubble_sort(Xs, Xs).
this is a very simple bubblesort algorithm, the only thing I don't
understand is the use of ,!, . I can't find what that's for, but if
I delete it the program returns a bunch of wrong solutions after the
first correct one.
thanks
Luca
.
- Follow-Ups:
- Re: A newbe wants to know what this mean..
- From: Chip Eastham
- Re: A newbe wants to know what this mean..
- Prev by Date: Re: copy_term/2 in Eclipse
- Next by Date: Re: A newbe wants to know what this mean..
- Previous by thread: XSB 3.1 Released
- Next by thread: Re: A newbe wants to know what this mean..
- Index(es):