Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
infradig committed Sep 20, 2023
1 parent db9a6d2 commit 206759f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions library/builtins.pl
Original file line number Diff line number Diff line change
Expand Up @@ -722,23 +722,23 @@
('$get_attributes'(Var, D) -> true ; D = []),
functor(Attr, Functor, Arity),
attribute(Module, Functor, Arity),
d_del(D, Module-Functor, Attr, D2),
d_del(D, Module, Attr, D2),
'$put_attributes'(Var, D2).

put_atts(Var, +Attr) :- !,
var(Var),
('$get_attributes'(Var, D) -> true ; D = []),
functor(Attr, Functor, Arity),
attribute(Module, Functor, Arity),
d_set(D, Module-Functor, Attr, D2),
d_set(D, Module, Attr, D2),
'$put_attributes'(Var, D2).

put_atts(Var, Attr) :- !,
var(Var),
('$get_attributes'(Var, D) -> true ; D = []),
functor(Attr, Functor, Arity),
attribute(Module, Functor, Arity),
d_set(D, Module-Functor, Attr, D2),
d_set(D, Module, Attr, D2),
'$put_attributes'(Var, D2).

:- help(put_atts(@var,+term), [iso(false)]).
Expand All @@ -753,21 +753,21 @@
('$get_attributes'(Var, D) -> true ; false),
functor(Attr, Functor, Arity),
attribute(Module, Functor, Arity),
\+ d_get(D, Module-Functor, _).
\+ d_get(D, Module, _).

get_atts(Var, +Attr) :- !,
var(Var),
'$get_attributes'(Var, D),
functor(Attr, Functor, Arity),
attribute(Module, Functor, Arity),
d_get(D, Module-Functor, Attr).
d_get(D, Module, Attr).

get_atts(Var, Attr) :- !,
var(Var),
'$get_attributes'(Var, D),
functor(Attr, Functor, Arity),
attribute(Module, Functor, Arity),
d_get(D, Module-Functor, Attr).
d_get(D, Module, Attr).

:- help(get_atts(@var,?term), [iso(false)]).

Expand Down

0 comments on commit 206759f

Please sign in to comment.