Documentation Prolog Predicate Reference builtin between/3

between/3

Check if value is within a range of integers.

Description

between( +integer, +integer, ?integer )

between(Bottom, Top, Int) is true if and only if Bottom =< Int =< Top. If Int is an unbounded variable, it will be bounded to every integer in the range [Bottom, Top].

Implementation