| summaryrefslogtreecommitdiff | 
diff options
| author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2019-01-16 00:06:23 +0100 | 
|---|---|---|
| committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2019-01-16 00:06:23 +0100 | 
| commit | e12544d7b9e58f26e66aa63bd61fc8c446c71a18 (patch) | |
| tree | 5244c0930d9ce66853da99380bb39f2a25ff1153 /src/ataxic.erl | |
| parent | 64a89dc3909ad147ae0d811cb7d1ca2cca31d09b (diff) | |
...
Diffstat (limited to 'src/ataxic.erl')
| -rw-r--r-- | src/ataxic.erl | 15 | 
1 files changed, 11 insertions, 4 deletions
| diff --git a/src/ataxic.erl b/src/ataxic.erl index 6e941c4..2bd8796 100644 --- a/src/ataxic.erl +++ b/src/ataxic.erl @@ -38,6 +38,8 @@  -record(lor, {params :: list(basic())}).  -record(neg, {param :: basic()}). +-record(list_cons, {param :: basic()}). +  % TODO: list all of the above.  -type basic() :: any(). @@ -72,7 +74,8 @@        eq/2,        land/1,        lor/1, -      neg/1 +      neg/1, +      list_cons/1     ]  ). @@ -126,12 +129,13 @@ basic_apply_to (#eq{ p0 = P0, p1 = P1 }, Val) ->  basic_apply_to (#land{ params = List }, Val) ->     lists:all(fun (E) -> basic_apply_to(E, Val) end, List); -  basic_apply_to (#lor{ params = List }, Val) ->     lists:any(fun (E) -> basic_apply_to(E, Val) end, List); -  basic_apply_to (#neg{ param = V }, Val) -> -   not basic_apply_to(V, Val). +   not basic_apply_to(V, Val); + +basic_apply_to (#list_cons{ param = V }, Val) -> +   [V|Val].  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  %% EXPORTED FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -180,6 +184,9 @@ lor (List) -> #lor{ params = List }.  neg (V) -> #neg{ param = V }. +-spec list_cons (basic()) -> basic(). +list_cons (V) -> #list_cons{ param = V}. +  -spec sequence_meta (list(meta())) -> meta().  sequence_meta (List) -> #mseq{ ops = List }. | 


