diff --git a/libkc3/env.c b/libkc3/env.c
index 3c91990..d810c67 100644
--- a/libkc3/env.c
+++ b/libkc3/env.c
@@ -2158,11 +2158,11 @@ s_fact_w * env_fact_w_eval (s_env *env, s_fact_w *fact,
s_tag * env_facts_collect_with (s_env *env, s_facts *facts,
s_list **spec,
- s_fn *callback, s_tag *dest)
+ s_callable *callback, s_tag *dest)
{
s_list *arguments;
s_facts_with_cursor cursor = {0};
- const s_fact *fact = NULL;
+ s_fact *fact = NULL;
s_fact_w *fact_w = NULL;
s_list **l;
s_list *list;
@@ -2192,7 +2192,8 @@ s_tag * env_facts_collect_with (s_env *env, s_facts *facts,
if (! fact_w_init_fact(fact_w, fact))
goto clean;
*l = list_new(NULL);
- if (! env_eval_call_fn_args(env, callback, arguments, &(*l)->tag)) {
+ if (! env_eval_call_callable_args(env, callback, arguments,
+ &(*l)->tag)) {
goto clean;
}
l = &(*l)->next.data.list;
@@ -2406,7 +2407,7 @@ s_tag * env_facts_with_macro (s_env *env, s_tag *facts_tag, s_tag *spec_tag,
s_tag *block_tag, s_tag *dest)
{
s_facts_with_cursor cursor = {0};
- const s_fact *fact = NULL;
+ s_fact *fact = NULL;
s_facts *facts;
s_tag facts_eval;
s_list *spec = NULL;
diff --git a/libkc3/env.h b/libkc3/env.h
index 8da02da..889f75a 100644
--- a/libkc3/env.h
+++ b/libkc3/env.h
@@ -61,7 +61,8 @@ const s_sym * env_defstruct (s_env *env, s_list *spec);
s_fact_w * env_fact_w_eval (s_env *env, s_fact_w *fact,
s_fact_w *dest);
s_tag * env_facts_collect_with (s_env *env, s_facts *facts,
- s_list **spec, s_fn *callback,
+ s_list **spec,
+ s_callable *callback,
s_tag *dest);
s_tag * env_facts_collect_with_tags (s_env *env, s_facts *facts,
s_tag *subject,
diff --git a/libkc3/kc3.c b/libkc3/kc3.c
index 7d6c4f4..f0bd8c9 100644
--- a/libkc3/kc3.c
+++ b/libkc3/kc3.c
@@ -248,9 +248,9 @@ bool * kc3_facts_add_tags (s_facts *facts, s_tag *subject,
}
s_tag * kc3_facts_collect_with (s_facts *facts, s_list **spec,
- s_fn *callback, s_tag *dest)
+ p_callable *callback, s_tag *dest)
{
- return env_facts_collect_with(&g_kc3_env, facts, spec, callback,
+ return env_facts_collect_with(&g_kc3_env, facts, spec, *callback,
dest);
}
diff --git a/libkc3/kc3_main.h b/libkc3/kc3_main.h
index 9117df1..7347970 100644
--- a/libkc3/kc3_main.h
+++ b/libkc3/kc3_main.h
@@ -76,7 +76,7 @@ bool * kc3_facts_add_tags (s_facts *facts, s_tag *subject,
s_tag *object,
bool *dest);
s_tag * kc3_facts_collect_with (s_facts *facts, s_list **spec,
- s_fn *callback, s_tag *dest);
+ p_callable *callback, s_tag *dest);
s_tag * kc3_facts_collect_with_tags (s_facts *facts,
s_tag *subject,
s_tag *predicate,