I have a function ‘foo’ and a variable ‘$foo’ referencing it.
function foo { param($value) $value + 5 } $foo = foo $foo
I can call $foo without args, but how can I pass parameters? This does not work:
$foo 5 $foo(5)
Actually the goal is to write such code:
function bar { param($callback) $callback 5 } bar(foo)
The problem is when you do
You put the result of the function in the variable $foo, not the function itself !
Try this :
And call it like this
Hope it helps !