:- use_module(library(strings)).

% Built-ins use one native spelling each, while vocabulary-style predicate names
% remain ordinary user predicates.
%
% This keeps the language small: arithmetic, comparison, and string operations are native,
% while list decomposition uses ordinary Prolog pattern matching.
%% ?- value(X0, X1).

%% ?- ok(X0, X1).

%% ?- tail(X0, X1).

%% ?- label(X0, X1).


% The first four rules call native built-ins; the last two rules show that
% application vocabulary is modeled with ordinary facts and rules.
value(nativeMath, X) :- (X is 0.125 + 0.875).
ok(nativeCompare, true) :- (2 < 3).
ok(nativeString, true) :- matches('scoped retail insight', 'retail|medical').
tail(nativeList, Tail) :- [_head|Tail] = [a, b, c].

% These names are just user data; eyeprolog does not give them special meaning.
example_label(vocabularyExample, "vocabulary names are ordinary predicate names").
label(vocabularyExample, Text) :- example_label(vocabularyExample, Text).
