Reversing the arguments of the get operator

I want to define a function that, given a field name f, returns the value of the field #f (concatenation of # and f) of the current tiddler.

To give the idea, I wrote a macro that does the same:

\define my-macro(f)
{{{ [all[current]get[#$f$]] }}}
\end

but it must be a function since later it is passed to a procedure that invokes it with the function filter operator.

If there was an operator like get, but with arguments reversed (input as parameter and vice versa), I could write:

\function my-function(f)
[<f>addprefix[#]reverseget<currentTiddler>]
\end

Can someone help me?

\function my-function(f)
[<f>addprefix[#]] :map[<..currentTiddler>get<currentTiddler>]
\end
1 Like