Linked Questions

0 votes
0 answers
140 views

I am really thinking hard to understand why java has introduced new concept called Lambda Expression in its 8th version. I mean as far as I understand it is just like a regular function which ...
Sai Chaithanya's user avatar
0 votes
0 answers
123 views

I was reading this page and I found the following example code in the Python documentation, but I don't fully understand how the result is produced. Example: >>> def make_incrementor(n): .....
user avatar
0 votes
0 answers
107 views

Im trying to wrap my head around some basic MVC OOP coding concepts. Consider the following. private $notfound public function __construct(){ $this->notFound = function($url){ ...
Tim C's user avatar
  • 5,735
1098 votes
14 answers
628k views

I keep hearing a lot about functors in C++. Can someone give me an overview as to what they are and in what cases they would be useful?
Konrad's user avatar
  • 41.1k
358 votes
5 answers
664k views

I am trying to sort some values by attribute, like so: a = sorted(a, lambda x: x.modified, reverse=True) I get this error message: <lambda>() takes exactly 1 argument (2 given) Why? How do I ...
Niklas Rosencrantz's user avatar
275 votes
8 answers
459k views

I come from OOP background and trying to learn python. I am using the max function which uses a lambda expression to return the instance of type Player having maximum totalScore among the list players....
Vijay's user avatar
  • 3,660
94 votes
14 answers
8k views

What is this 'Lambda' everyone keeps speaking of? A lot of people seem to love it, but all I can gather from it is it is just a way of cramming lots of lines of code into a single expression. Can ...
Josh Hunt's user avatar
  • 14.5k
94 votes
7 answers
20k views

Could someone provide a good description of what a Lambda is? We have a tag for them and they're on the secrets of C# question, but I have yet to find a good definition and explanation of what they ...
Fred's user avatar
  • 2,723
92 votes
4 answers
186k views

I saw some examples using built-in functions like sorted, sum etc. that use key=lambda. What does lambda mean here? How does it work? For the general computer science concept of a lambda, see What is ...
Thiru's user avatar
  • 3,423
32 votes
4 answers
18k views

In Java 8 the lambda expression is introduced to help with the reduction of boilerplate code. If the interface has only one method it works fine. If it consists of multiple methods, then none of the ...
Soumya Kanti Naskar's user avatar
31 votes
2 answers
20k views

I'm beginning to appreciate the value of lambda expressions in python, particularly when it comes to functional programming, map, functions returning functions, etc. However, I've also been naming ...
joshua.r.smith's user avatar
18 votes
5 answers
8k views

I am new to flultter and dart. I see main calls the first widget as follows with added print statements. void main() { print('begin '); runApp(MyApp()); print('end'); } I see another way is ...
user avatar
11 votes
11 answers
18k views

I want to know what exactly is lambda in python? and where and why it is used. thanks
Hossein's user avatar
  • 42.4k
18 votes
2 answers
66k views

I have a problem with my PyQt button action. I would like to send a String with the Function but I got this Error: TypeError: argument 1 has unexpected type 'NoneType' import sys from PyQt5....
Darkdrummer's user avatar
15 votes
3 answers
5k views

I saw this question on one of the job postings and its asking what's a lambda function and what its relation to higher order function. I already know how to use lambda function but not quite confident ...
Marconi's user avatar
  • 3,661

15 30 50 per page
1
2 3 4 5 6