Note on the example code. This clause:
can be simplified to:
key_value_validate(Key_value) :-
must_be(ground,Key_value),
Key_value = kv(_,_).
If Key_value is ground, then necessarily Key and Value are also ground.
Note on the example code. This clause:
can be simplified to:
key_value_validate(Key_value) :-
must_be(ground,Key_value),
Key_value = kv(_,_).
If Key_value is ground, then necessarily Key and Value are also ground.