Forum Discussion

p45cal's avatar
p45cal
Icon for Solution Supplier rankSolution Supplier
1 year ago
Solved

The 'right' way to bring a custom function requiring arguments 'inline'

I have a table to which I want to add a column listing dates 1 month apart for the duration: So for the second row I want to generate:   Note that this question is not asking abou...
  • AlienSx's avatar
    AlienSx
    1 year ago

    p45cal , regarding "in-line" function definition and call: consider Function.Invoke as an alternative. Example: 

     

    ( ) => 5 // this is our function
    ( ( ) => 5 )( ) // this is how you call it now
    Function.Invoke( ( ) => 5, { } ) // alternative way to call our function

     

    I am not aware of any other alternatives. And there is nothing wrong with your current approach. But the fact that you apply it to solve that particular problem (the one with different "_" conflicting each other) does not look like a ... reasonable one in that particular case. The problem is solved by different identifiers, not by "in-line function call".