Richie Vos

More from me

July 14, 2008

workaround actionscript’s sucky map function

Instead of writing

function(element:Object, i:uint, a:Array):Object{ … }

and then always ignoring everything but element, just make your function var-arg and ignore the var-arg:

function(element:Object, …a):Object {..}

still ugly, but less characters and noise.

blog comments powered by Disqus