Hash :
c9c3b2ab
Author :
Thomas de Grivel
Date :
2024-03-19T17:23:22
%{module: C3.Facts.Dump,
version: 1}
add {List, :is_a, :module}
add {List, :symbol, List.cast}
add {List, :symbol, List.map}
add {List, :symbol, List.reverse}
replace {List.cast, :symbol_value, cfn List "list_init_cast" (Result, Tag)}
replace {List.map, :symbol_value, fn {
([], _) do
[]
end
([a | b], f) {
[f(a) | List.map(b, f)]
}
}}
replace {List.reverse, :symbol_value, fn {
(x) { List.reverse(x, []) }
([], acc) { acc }
([a | b], acc) { List.reverse(b, [a | acc]) }
}}