length(?List, ?Length) (arg2p: tuProlog 3 has none): Length is the number of items of List. A partial list (its tail a variable) is completed with fresh variables to the given length, or, with no length given, to each length in turn from the items it has.
ISO throw/1: raises its argument as a ResolutionException, to be looked for by an enclosing catch/3 as the state machine climbs the execution-context stack in StateException.