Tagged Questions
1
vote
4answers
421 views
How do I make lambda functions generic in Scala? [duplicate]
As most of you probably know you can define functions in 2 ways in scala, there's the 'def' method and the lambda method...
making the 'def' kind generic is fairly straight forward
def ...
0
votes
4answers
159 views
How do I make a function only callable from another function?
//function declerations
void func_A();
void func_B();
void func_SubA();
//main
int main(){ ... }
//function definitions
void func_A(){ ... }
void func_B(){ ... }
void func_SubA(){ ... }
What is ...
0
votes
5answers
104 views
C# Possible lambda in array's content declaration
I have such piece of code:
string suffix = "wallpapers\\";
string extenstion = ".jpg";
string[] wallpapers;
.....
void SetWallPapers()
{
wallpapers = new string[] {
...
3
votes
2answers
98 views
Lambda function index
I noticed that whenever I use create_function a name is assigned to the function that looks like:
lambda_N
What's weird is that if I refresh the page that N increases, like lambda_2, lambda_3 etc.
...
1
vote
2answers
148 views
Wrapped lambda expressions
Here's a lamba wrapper expression defined:
function <int(double)> f =
[](double x) -> int{ return static_cast <int> (x*x); };
It is used like this:
f(someintvalue);
What is ...
1
vote
3answers
338 views
SortedList with string as index and function pointer or delegate as value? And Calling Functions by strings?
I'm not familiar with delegates and lambdas but at this moment, I have to do these two things:
One of them is:
I need to pass the function to SortedList. I don't know how it can be done.
Why I ...