Most voted "functional-programming" questions
Functional programming is a programming paradigm that primarily uses functions as a means for building captures and expressing calculations that comprise a computer program.
Learn more…97 questions
Sort by count of
-
68
votes3
answers19793
viewsFunctional Programming and Object-Oriented Programming. What are they and what are their main differences?
What are and what are the main differences between Functional Programming and Object-Oriented Programming?
-
43
votes1
answer21497
viewsWhat is Reactive Programming (Reactive Programming)?
Can someone explain to me clearly and objectively? I read some more articles still not very clear.
-
31
votes2
answers7772
viewsWhat characterizes imperative and functional programming?
What characterizes the imperative and functional programming and what are the differences between them in relation to each other? I cannot understand these two paradigms. Note: If you can cite…
javascript terminology functional-programming imperative-programmingasked 8 years, 6 months ago gato 22,329 -
24
votes4
answers4078
viewsPros and cons of the functional paradigm and Haskell
I saw that, clearly, the Functional Programming Stop is not at all famous in the world of programming in general. However, talking to a few fans of languages like Lisp, Ocaml, F#, Haskell, etc. I…
-
22
votes2
answers1375
viewsWhat is it and what are the advantages of Currying?
This is a very widespread concept in functional languages, but what it is exactly? Why is it advantageous? Bonus point: Is it possible to use it in non-functional languages? Or more generally, in…
terminology characteristic-language functional-programmingasked 10 years, 5 months ago Maniero 444,682 -
20
votes2
answers3325
viewsWhat would be real cases of use of functional programming in the world . NET (F#)?
Recently (Okay, it’s been a few good months) I’ve been interacting with f-language#, which is Microsoft’s response to offer a functional programming language on the . NET platform. However, it is…
-
19
votes2
answers6496
viewsWhat is the difference between recursion and tail recursion?
In functional programming languages, it is said that it is possible to avoid stack bursts using "tail recursion". But what is the difference between normal recursion and tail recursion?
-
17
votes2
answers10623
viewsImperative and Declarative Paradigm
What are the differences between mandatory and declarative programming paradigms? Advantages and disadvantages?
terminology functional-programming paradigms imperative-programmingasked 9 years, 3 months ago Cold 3,842 -
16
votes1
answer1022
viewsThe use of immutability
Immutability What are the advantages and benefits, when to use and why to use immutability in my projects? The complexity of the implementation x time, worth it? When I should not use immutability…
-
15
votes4
answers1141
viewsHow to simulate "tail recursion" in C#?
No. Net, I know it is possible to make cause calls because the compiler of F#, when optimizing code, transforms a function with tail recursion into a function with a loop, thus avoiding stack…
-
15
votes1
answer5340
viewsDifference between high-order and first-class functions
In functional language, what is the difference between high-order functions (high-order functions) and first-class functions (first-class functins)? In Javascript, what would be the difference…
-
15
votes1
answer221
viewsIs there any way to build a useful application based entirely on the functional paradigm?
The functional paradigm, in theory, is beautiful to see. Purism, immutability and determinism. This can facilitate development, decrease the incidence of bugs and help in maintainability. From this,…
-
14
votes1
answer995
viewsWhat is a Monad and what is it for?
I remember at the university it was explained to me what a monad, but time has passed and I no longer know what he is. This is also due to the little contact I have with functional languages. In…
functional-programmingasked 7 years, 11 months ago Bruno Costa 5,878 -
13
votes1
answer14872
viewsWhat is Hashcode and what is its purpose?
I have observed that the use of hashcode is used in comparisons, but what does the term mean? Its use in programming is specific in comparison?
-
12
votes1
answer3054
viewsWhat is a pure function?
When studying functional programming, I heard a lot of the term "pure function", or Pure Function. What characterizes this type of function and what is its importance for the functional paradigm?…
-
12
votes1
answer294
viewsMandatory language incorporating functional elements
Yesterday I was reading an answer about the differences between the paradigms functional and imperative, and I came across this statement: Functional Programming and Object-Oriented Programming.…
c# characteristic-language functional-programming paradigms imperative-programmingasked 6 years ago Pedro Gaspar 3,289 -
11
votes2
answers4166
viewsWhat is the difference between the map() and flatMap() functions of Java 8?
What is the difference between the functions map() and flatMap() made available by the API stream java 8?
-
9
votes1
answer2436
viewsWhat is the purpose of the`reduce` function in Python?
In which cases is useful and how can I use the function reduce?
python python-3.x functional-programmingasked 6 years, 7 months ago Pedro von Hertwig Batista 3,434 -
9
votes2
answers994
viewsWhat are side effects?
I was reading that reply and it has a table where it says that functional programming has no side effects and that OOP has, it generated me two doubts, being them: What are these side effects? Can…
-
9
votes2
answers300
viewsDifference between "Function Operator" and "Function Factory"
To the chapter 11 of the book Advanced R, the author defines Function Operator as: A Function Operator is a Function that takes one (or more) functions as input and Returns a Function as output.…
-
9
votes1
answer109
viewsCan Functional Programming hinder the discovery of certain types of bugs?
As I understand it, functional programming (or at least a functional programming style) makes it easy to find and avoid bugs (it’s easy to test pure functions, immutability protects data,…
functional-programmingasked 5 years, 3 months ago Douglas 961 -
9
votes1
answer156
viewsWhat is Pattern matching in functional languages?
When reading about the functional paradigm, I realized that most languages have a common characteristic, the Pattern matching. Contextualizing for a programmer like me, accustomed to the…
-
9
votes0
answers259
viewsWhat is the relevance of category theory to computer science?
I’m studying a little about functional programming and not infrequently I end up coming across people who talk about Category Theory, which makes me think it might be something with some importance…
functional-programming computer-science category-theoryasked 3 years, 7 months ago Luiz Felipe 32,886 -
8
votes2
answers205
viewsWhat is the difference between Scheme sequels and other languages?
I have heard that Scheme has "first-class sequels", while other Lisps (and other languages) do not. I researched it, but the material I found was not specific. What I understand is that sequels are…
functional-programmingasked 10 years, 9 months ago André Leria 5,047 -
8
votes1
answer1009
viewsFunctional Programming and Referential Transparency
Referential transparency assures me that given the same input values for a function, it will always give me the same return value. As I would have to do in the case of a function that accesses the…
javascript functional-programming haskell erlang f#asked 9 years, 4 months ago Henri Cavalcante 384 -
8
votes1
answer150
viewsWhat it means to infix on Haskell
What is and what this infixr 3 is for &&? infixr 3 && (&&) :: Bool -> Bool -> Bool True && True = True _ && _ = False
-
8
votes1
answer396
viewsProposal from the Clojure?
Recently I heard about this programming language, Clojure, it uses only functions, is not typed, and appears to be quite complex, this is an example of a function that takes a parameter and does the…
characteristic-language functional-programming clojureasked 8 years, 3 months ago Felipe Paetzold 4,527 -
7
votes1
answer586
viewsDo Java 8 streams and streams bring more benefits than concision?
The only benefits I understand in Amble and streams Java 8 is code saving and, as the case may be, better expressing the author’s intention. That’s all? Is there any example of code that uses one of…
java lambda-expressions java-8 functional-programming streamasked 7 years, 4 months ago Piovezan 15,850 -
7
votes4
answers315
viewsHow to apply several functions to the same object?
How is it possible, in the R, apply several functions to the same object? Example: Let’s say I have a vector x. set.seed(123) x <- rnorm(10) x # [1] -0.56047565 -0.23017749 1.55870831 0.07050839…
-
6
votes1
answer166
viewsImplement Java Functional Programming Loop
private List<String> getPermissoes(TipoUsuario tipoUsuario) { List<String> permissoes = new ArrayList(); for (Permissao permissao : tipoUsuario.getPermissoes()) {…
-
6
votes0
answers164
viewsHow to handle "large iterations" using recursion?
In the context of functional programming, it is said that any type of loop repeats (such as for or while) should be set aside in favor of recursion. But as the number of elements of the work begins…
-
6
votes1
answer132
viewsWhat are algebraic data types (algebraic data types or Adts)?
Eventually I read in some articles related to functional programming the term algebraic data types, but I don’t really know what they are and I end up getting a little lost. What are algebraic data…
terminology typing functional-programming type-theory algebraic-typesasked 3 years, 11 months ago Luiz Felipe 32,886 -
5
votes1
answer109
viewsHave the functional features of Java 8 made any Pattern design obsolete?
It is said that functional programming makes certain design patterns (thinking of the Gof) unnecessary. There’s even a presentation showing it somewhere (I’m not looking now because I’m on cell…
-
5
votes1
answer112
viewsIs it prudent to use several paradigms in a C++ project?
Would it be advantageous to use several paradigms in a project in C++? For example, in a certain part of the code I use reactive Programming, in other parts I use OOP, and in other parts I use…
c++ oop encoding-style functional-programming paradigmsasked 5 years, 11 months ago Strawberry Swing 177 -
5
votes1
answer60
viewsHow to implement mappers in R?
I would like the answer to contain information on: What are mappers? How to create a mapper on R? In what situations mappers are used (their role in functional programming)?…
-
5
votes1
answer95
viewsGet equivalent expression to list(zip(list, Heights)) using the map() function
Be: heights = [x*0.0254 for x in [69,77,54]] lista = [69,77,54] The expression: print(list(zip(lista,heights))) has as output: [(69, 1.7526), (77, 1.9558), (54, 1.3716)] My goal is to get the same…
-
5
votes1
answer123
viewsHow to perform semantic analysis using pure functional programming without side Effect?
I wonder if there is any way to know what the current context is without using side effects as Agente of the elixir , letting semantic analysis be carried out along a pipeline of functions that walk…
-
4
votes1
answer503
viewsProgram to filter odd numbers in a number list
I wrote a script in Haskell to find filter the odd numbers from a list and show them on the screen, but I keep getting an error when displaying the results.. impares[] =[] impares(x:xs) |(mod(x…
-
4
votes1
answer792
viewsHow does the system of voting and rating by stars work?
I see the rating of the apps in the stores of Microsoft and Google and I can not understand the logic of both, I would like to make ratings by stars! But first I need to understand the logic of…
-
4
votes2
answers8606
viewsWhat is the difference between the angular foreach and the javascript map function
I would like to know the difference between using the angular.forEach and the function map javascript. ex: angular.forEach(meuArray, function(itens) {...}) meuArray.map(function(itens) {...});…
-
4
votes1
answer202
viewsFunctional programming: applicability of parameters (.x) and (.) in purrr::map
I’m migrating to the package purrr, mainly in relation to the use of the function map. But I’m having a hard time understanding the concepts of functional programming in purrr. I would like to learn…
-
4
votes1
answer47
viewsWhat is the name of a non-retail recursion?
In tail recursion, the recursive call is the last thing the function does, and can be optimized. And when is it not tail? What is the name? "Common"? "Body"? There must be a specific name for it!…
-
4
votes2
answers79
viewsUsing functional programming features to remove a word list from another list
I am analyzing a literary text and am having the following problem to remove a group of words from the text. These are not repeated words. link_words are words that will disturb a later analysis of…
-
4
votes1
answer101
viewsHow to globally save the output of a function in R?
I have trouble saving function output in R. In the following code, for example, I create an array representing a sudoku game: quantLinhas <- readline(prompt = 'insira o número de linhas do…
-
3
votes1
answer910
viewsImplement Lambda Expression TRUE, FALSE, AND, OR and NOT with Javascript
I was reading about lambda in that article and showed examples of functional programming implementing TRUE, FALSE, NOT, AND and OR with Ruby: T = lambda { |a,b| a } F = lambda { |a,b| b } display =…
-
3
votes1
answer47
viewsUse include or constants to pick up codes?
I have created a file containing patterns that are used in my system. I would like to know what is the difference in performance between calling the code by a include or by a constante thus:…
-
3
votes0
answers223
viewsFunctional or imperative language to study Machine Learning?
I am new to programming and I am studying javascript to become Front End Developer as a short term goal, in the future I intend to be a programmer, because I have an interest in machine…
functional-programming artificial-intelligence haskell machine-learning imperative-programmingasked 8 years, 5 months ago Misael 41 -
3
votes0
answers57
viewsWhat are the disadvantages of immutable objects?
It is notorious the advantages of immutable objects, such as: they are more reliable because they are never changed; they are thread-safe, as they have no problems with synchronization when several…
-
3
votes1
answer75
viewsHow to use Monad batteries?
I studied the topic of Monad and decided to make a program to test my knowledge. import Control.Monad.IO.Class (liftIO) import qualified Control.Monad.State as ST import Control.Monad.Trans.State…
-
3
votes2
answers374
viewsJava lambdas are equivalent to Javascript Closures?
I started studying functional programming and I’m a little confused about these two items. My point is: Java lambdas are equivalent to Javascript Closures? If they are not, what is the difference…
javascript java lambda-expressions functional-programming closuresasked 7 years, 5 months ago Bruno Peres 1,202