How can I build the following:
dynamic([a], ^var1 and ^var2 and ^var3)
dynamically if all these variables are in a list vars
.
I think I will need to use AST but a little help is welcome
How can I build the following:
dynamic([a], ^var1 and ^var2 and ^var3)
dynamically if all these variables are in a list vars
.
I think I will need to use AST but a little help is welcome
list
|> Enum.map(condition -> dynamic([a], ^condition) end)
|> Enum.reduce(fn a, b -> dynamic(^a and ^b) end)
You are a beast.