Refactoring /a block into a `procedure` , /etc

starting from this snippet (thanks eric!)
.Create tiddler from textfield/dropdown,etc and adding prefix to tiddler name - #3 by EricShulman

\define form() $:/state/NewTiddlerForm

<$edit-text class='tc-edit-texteditor' tiddler=<<form>> field='name_temp' placeholder='Table'/>
<$edit-text class='tc-edit-texteditor' tiddler=<<form>> field='label' placeholder='Label'/>
<$edit-text class='tc-edit-texteditor' tiddler=<<form>> field='url' placeholder='URL'/>
<$edit-text class='tc-edit-texteditor' tiddler=<<form>> field='text' default="" placeholder='Links and stuff'/>

<$button>Create Tiddler
   <$tiddler tiddler=<<form>>>
      <$action-createtiddler $basetitle={{{ [{!!name_temp}addsuffix[_table]] }}}
         label={{!!label}} url={{!!url}} text={{!!text}} tags="table">
         <$action-navigate $to=<<createTiddler-title>>/>
      </$action-createtiddler>
   </$tiddler>
   <$action-deletetiddler $tiddler=<<form>>/>
</$button>
<$button>Clear Form
   <$action-deletetiddler $tiddler=<<form>>/>
</$button>

im attempting to modify this example and failing =/

in various ways =]

so far i have (working)
wrapped the above in

\procedure mk_fm(var:“tmp”,suffix)

added var to this ?macro! ?..

\define form() $:/state/New_$(var)$_TiddlerForm

added

addsuffix<suffix>

defined a few functions

\function join(s1,s2,delim:"") [<s1>] [<s2>] +[join<delim>]

however exactly !!!how??? to pass

{!!name_temp}

to function as arg/parameter

<<join s1:{!!name_temp}>>

or whatever lingua franca de jour

idFk!?

is this (warping in a procedure ) generally current correct approach ?

or would some other method(s) work better ??

wiki text aficionado’s ?? please advise!!!

only use square brackets around literal text params. For variables, just use the angle brackets, like this:

addsuffix<suffix>

ahh
thanks ! … i did know this … even found someone s explanation
about the reason other operators are double-wraped in some context

i just forgot to remove the [] when adding the things id managed to figure out !! :crazy_face:
(vai good old deductive reasoning powered by toast & tea )

I think!!! ( as im reading other machine-generated code/answers in other posts =S )

the/my biggest issue is understanding the context in which ~things~ interact ( especially after reading about macro deprecation , and recalling past attempts to fiddle with in the $:/system and wandering why/how things-fall-apart )

eg: Problem with variable substitution to create a class - #12 by EricShulman

“restate my assumptions”…