From f8efd52134a1cb6494af67f0b10eba8b68ae711b Mon Sep 17 00:00:00 2001 From: itsdfish Date: Wed, 26 May 2021 07:33:33 -0400 Subject: [PATCH] minor update to rule constructor --- Project.toml | 2 +- src/Structs.jl | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Project.toml b/Project.toml index 7aa0afe..6b3f830 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "ACTRModels" uuid = "c095b0ea-a6ca-5cbd-afed-dbab2e976880" authors = ["itsdfish"] -version = "0.6.13" +version = "0.6.14" [deps] ConcreteStructs = "2569d6c7-a4a2-43d3-a901-331e8e4be471" diff --git a/src/Structs.jl b/src/Structs.jl index e286082..08b4bea 100644 --- a/src/Structs.jl +++ b/src/Structs.jl @@ -372,8 +372,8 @@ Rule(;utlity=0.0, conditions, action) end function Rule(;utility=0.0, conditions, name="", actr, task, action, args=(), kwargs...) - Rule(utility, map(x->()->x(actr, args...; kwargs...), conditions), - ()->action(actr, task; kwargs...), name) + Rule(utility, ()->conditions(actr, args...; kwargs...), + ()->action(actr, task; kwargs...), name) end """ @@ -418,8 +418,8 @@ function exact_match(actr) return rules end -function match(rule::Rule) - all(c->c(), rule.conditions) +function match(rule) + return rule.conditions() end """