-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathactor.lgt
More file actions
31 lines (26 loc) · 799 Bytes
/
Copy pathactor.lgt
File metadata and controls
31 lines (26 loc) · 799 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
:- category(actor).
:- info([ version is 1:4:0
, author is 'Paul Brown'
, date is 2019-11-23
, comment is 'An category for actors: those who can do actions.'
]).
:- set_logtalk_flag(events, allow).
:- public(action/1).
:- mode(action(?object), zero_or_more).
:- info(action/1,
[ comment is 'Denotes an action the actor has permission to do.'
, argnames is ['Action']
]).
:- public(do/1).
:- meta_predicate(do(2)).
:- mode(do(+object), zero_or_one).
:- info(do/1,
[ comment is 'Do the Action via bedsit.'
, argnames is ['Action']
]).
do(A) :-
nonvar(A),
functor(A, Func, Ar),
::action(Func/Ar),
bedsit::do(A).
:- end_category.