This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/Logtalk/library/list1.lgt

22 lines
385 B
Plaintext
Raw Normal View History

:- object(list(_type),
extends(list)).
:- info([
version is 1.0,
author is 'Paulo Moura',
date is 2006/1/29,
comment is 'List predicates with elements constrained to a single type.']).
valid(List) :-
nonvar(List),
parameter(1, Type),
\+ \+ valid(List, Type).
valid([], _).
valid([Value| List], Type) :-
Type::valid(Value),
valid(List, Type).
:- end_object.