We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a way to get the source code of the lambda function passed to another function?
I get the expected result with basic types
def myBasicFunc(param: Int): String = { sourcecode.Args().head.head.toString } myBasicFunc(4) // Text(4,param)
But when I try to use the same approach with lambda functions I only get the generic function1 value
def myLambdaFunc(param: Int => Int): String = { sourcecode.Args().head.head.toString } myLambdaFunc(x => x*2) // Text(<function1>,param)
Is this the expected behavior? Am I missing something?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Is there a way to get the source code of the lambda function passed to another function?
I get the expected result with basic types
But when I try to use the same approach with lambda functions I only get the generic function1 value
Is this the expected behavior? Am I missing something?
The text was updated successfully, but these errors were encountered: