If we consider wikitext, and particularly filter syntax a programming language, having situations when a variable holds a string value that is valid code in that language is possible (yet it usually adds complexity to the codebase and might have security implications like code execution if any input is just accepted as trusted), this is reflection. Sometimes I used to do this in Python, so I’ll link the Wikipedia example for reference: Reflective programming - Wikipedia
I tried to approach OP’s question the same way but of course I can’t compete with your blitz skills
Here’s my code so far:
\function .eval(str)
[<str>]
\end
{{{[[1234]addprefix[5678]]}}}
<$wikify name="myfilterexp" text="[{{a!!af}}]{{b!!bf}}">
<<myfilterexp>>
---
{{{[.eval<myfilterexp>]}}}
</$wikify>
I have solved the easier first half - I’ve got the inner part of the filter in a variable.
Now I’m struggling to tell TiddlyWiki to treat it like a filter expression. As you can see, I have tried to “cheat” by using a function, but it does not work. How to do it the right way?