CLICK HERE TO COPY
Actionscript:
appendExclamation("actionsnippit")("dot")("com")("is")("live");
function appendExclamation(str:String):Function{
trace(str + "! ");
return appendExclamation;
}
/* outputs:
actionsnippit!
dot!
com!
is!
live!
*/
This technique allows you to call a function more than once on one line. I first saw this used in the source files from a talk at flashcoders ny... I didn't attend the talk, but stumbled on this interesting blog post awhile back http://www.flashcodersny.org/wordpress/?p=166. [...]