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/examples/mi/time.lgt

27 lines
336 B
Plaintext
Raw Normal View History

:- object(time).
:- public(t/1).
:- mode(t(?integer), zero_or_one).
:- private(t_/1).
:- mode(t_(?integer), zero_or_one).
:- dynamic(t_/1).
:- public(translate/1).
:- mode(translate(+integer), zero_or_one).
t(T) :-
::t_(T).
translate(T) :-
integer(T),
::retractall(t_(_)),
::assertz(t_(T)).
:- end_object.