10Of course, one could specify the last function in a way not requiring the nonexec rule, for example by the equations last(nil) = error, last(N : nil) = N, and last(N : (M : XS)) = last (M : XS). The point here is to illustrate with a simple example the use of narrowing with rules having extra variables in their righthand sides, which is typical of logic programming and functional-logic programming.