example :- between(1,10,Val), write(Val), Val<10, write(', '), fail. example.