Did you know ... Search Documentation:
Pack canny_tudor -- prolog/canny/arity.pl
PublicShow source
 arities(?Arities0:compound, ?Arities:list) is semidet
Suppose that you want to accept arity arguments of the form {A, ...} where A is the first integer element of a comma-separated list of arity numbers. The Arities0 form is a compound term enclosed within braces, comprising integers delimited by commas. The arities/2 predicate extracts the arities as a list.

Empty lists fail. Also, lists containing non-integers fail to unify. The implementation works forwards and backwards: arity compound to arity list or vice versa, mode (+, -) or mode (-, +).