foreach( ele list( list("funcA" "funcB") list("funC" "funcD"))
newFunctionName = stringToSymbol(strcat( car(ele) cadr(ele) ))
putd(newFunctionName lambda((args)
printf("Hello World - %L\n" args)
)
)
)
funcAfuncB("test")
Hello World - "test"
However, I would say that creating functions on the fly is something that is even more powerful in SKILL++ mode, because that supports the concept of "closures". For example (either type toplevel('ils) and then type this in the CIW, or put in a file with a ".ils" suffix):
defun(CCFmakeCounter (@key (init 0) (step 1))
lambda(() init=init+step)
)
c1=CCFmakeCounter()
c2=CCFmakeCounter(?init 4 ?step 3)
c1() => 1
c1() => 2
c2() => 7
c2() => 10
c1() => 3
This concept is covered in more detail in the SKILL documentation. The idea is that CCFmakeCounter() is returning a function object with the specific environment containing the arguments that were passed in (it's the same function object, but the environment changes in essence). In SKILL++ mode functions are variables, so you can much more easily pass around function objects without needing to use funcall or apply to call them.
Regards,
Andrew.