355,415 views
38 votes
38 votes
Select all that apply: Our primary objectives in functional programming are: Group of answer choices Functions should be as pure as possible following a pattern of Input->Processing->Output To model algorithms in a state-machine like format Removing state from programming Modeling data into a fact-base to be queried Raising our abstraction towards math Code free of side effects Modeling data into classes/objects that intercommunicate to solve software issues

User Matt Wilkie
by
3.5k points

1 Answer

20 votes
20 votes

Answer:

Functions should be as pure as possible following a pattern of Input->Processing->Output

To model algorithms in a state-machine like format

Code free of side effects

Step-by-step explanation:

Functional programming is a popular concept in most popular programming languages such as Lisp that makes use of functions in separating code that aims to define and solve a particular problem which is part of a bigger problem. Functional programming focuses on what to solve, ie what is the problem rather than how do we solve it. It divides up code in meaningful blocks that makes it a lot more understandable, allowing big problems to be solved in tiny bits and not an overwhelming whole. Functional programming adopts the state-machine like format as it makes use of input and alters state as necessary(not hard coded). It also removes side effects issues that may be experienced when a function affects or mutates variables(global variables) that may be outside its block.

User Adan Cortes
by
2.7k points