Top "Functional-programming" questions

Functional programming is a programming paradigm based upon building abstractions using functions, avoiding side effects and change of state.

Implementing a callback in Python - passing a callable reference to the current function

I want to implement the Observable pattern in Python for a couple of workers, and came across this helpful snippet: …

python design-patterns functional-programming callback observer-pattern
How to avoid long nesting of asynchronous functions in Node.js

I want to make a page that displays some data from a DB, so I have created some functions that …

javascript asynchronous functional-programming node.js
Why can I define structures and classes within a function in C++?

I just mistakenly did something like this in C++, and it works. Why can I do this? int main(int …

c++ data-structures functional-programming
Why no Array.prototype.flatMap in javascript?

flatMap is incredibly useful on collections, but javascript does not provide one while having Array.prototype.map. Why? Is there …

javascript functional-programming
How can I use map and receive an index as well in Scala?

Is there any List/Sequence built-in that behaves like map and provides the element's index as well?

scala functional-programming map
Large-scale design in Haskell?

What is a good way to design/structure large functional programs, especially in Haskell? I've been through a bunch of …

haskell functional-programming monads large-scale
Advantages of stateless programming?

I've recently been learning about functional programming (specifically Haskell, but I've gone through tutorials on Lisp and Erlang as well). …

functional-programming state immutability
How to sort a list in Scala by two fields?

how to sort a list in Scala by two fields, in this example I will sort by lastName and firstName? …

scala sorting functional-programming
python list comprehensions; compressing a list of lists?

guys. I'm trying to find the most elegant solution to a problem and wondered if python has anything built-in for …

functional-programming python list-comprehension
Efficiency of purely functional programming

Does anyone know what is the worst possible asymptotic slowdown that can happen when programming purely functionally as opposed to …

algorithm functional-programming performance