mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-23 21:33:49 +00:00
Estimated hours taken: 0.25 tests/valid/assoc_list.m: Fix some software rot: it was declaring `pair' explicitly, rather than importing std_util.
12 lines
359 B
Mathematica
12 lines
359 B
Mathematica
:- module assoc_list.
|
|
:- interface.
|
|
:- import_module list, std_util.
|
|
|
|
:- pred assoc_list_member(pair(K,V), list(pair(K,V))).
|
|
:- mode assoc_list_member(bound(free - ground) -> ground, in) is semidet.
|
|
:- mode assoc_list_member(bound(free - free) -> ground, in) is nondet.
|
|
|
|
assoc_list_member(X, [X|_]).
|
|
assoc_list_member(X, [_|Xs]) :-
|
|
assoc_list_member(X, Xs).
|