[Item1|List1]«List1occurs in the guard of two clauses. Composing guard con-straints into decision trees can eliminate redundant tests:
| Lesser= | Greater=
+ :- [Item|List1]=List,
| Lesser=[Item|Lesser1], part(List,Pivot,Lesser1,Greater) }.
using otherwise (or else). The otherwise clause is only tried if all others are inappli-cable.