View Single Post
Old 02-25-2020, 06:39 PM   #1
Human being with feelings
Join Date: Oct 2013
Location: Seattle, WA
Posts: 809
Default passing a function as an argument

Is this a thing? I could have sworn that I saw it once in someone's code but I'll be danged if I remember where. Looking to see if anyone knows how, my google fu isn't turning up anything.

I'm looking for something like this:

function modA(func)
  a = func(a);

obj.modA( invert() );
obj.modA( scale() );
Does it exist? What's the proper syntax?
SaulT is offline   Reply With Quote