-2
votes
0answers
21 views

Python lambda vs Functional programming's lambda [on hold]

Could someone explain the basic difference between Python's lambda and functional programming's lambda?
6
votes
3answers
160 views

Why I need to use unit type in F# if it supports void type?

If to read MSDN article: Unit Type (F#) ...The unit type is a type that indicates the absence of a specific value; the unit type has only a single value, which acts as a placeholder when no ...
0
votes
2answers
71 views

To do beta reduction in Matlab?

How can you do a beta reduction like the following in Matlab? My goal is to avoid duplicate assignments and lazy-evaluate things -- perhaps related to the question multiple step anonymous ...
0
votes
2answers
99 views

Is there way in C# to pass all agruments in callback function for the precalculate

I have such a method: internal PointGeospatial ConvertToSpherical(double x, double y, double z) I wonder, does exist such a possibility to handle all arguments in method in some functional style in ...
4
votes
5answers
369 views

Is polymorphism in C# so polymorphic as could be?

I wonder, how is C# polymorphic? If we base on the definition of the word: polymorphism ( ...polymorphism in the context of object-oriented programming, is the ability to create a variable, a ...
4
votes
2answers
370 views

How to create a K combinator in the enchanted forest? (To Mock a Mockingbird)

Recall that the K combinator is a constant function. It always returns its first argument: Kxy = x for all y In the book To Mock a Mockingbird the author presents an example of an enchanted forest ...
3
votes
2answers
152 views

Filter values in a Python object array generically with a lambda function as a string

I'm working on a generic framework, and at some point I'm trying to filter variables in a generic manner. Take for example the following class: class X: def __init__(self, val): self.val ...
4
votes
7answers
275 views

Example where lambdas are very useful in Python

I met lambda expressions in Python. I have seen already many easy examples (including examples on SE) where lambda expressions produce functions like adders of whatever but I can't see the real ...
17
votes
2answers
1k views

Can currying be used with lambda functions?

This piece of code fails to compile and I don't know if it is because it can not be done, lambdas do not inherit from binary_function, or it is just that I'm getting the syntax wrong #include ...
2
votes
1answer
218 views

Few questions on generator expressions and speed efficient alternatives

Consider the following code, integral to my questions below: import functools N = 3 class Struct: """Create an instance with argument=value slots. This is for making a lightweight object ...