Using has_type(list(Type), X) with user created type not working as expected

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.

1 Like