Prev Previous Post   Next Post Next
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

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -7. The time now is 02:09 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.