Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Functional_Programming

Functional programming is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids changing-state and mutable data. In functional programming:

  1. First-Class Functions: Functions are treated as first-class citizens, meaning they can be assigned to variables, passed as arguments, and returned from other functions.

  2. Immutable Data: Data structures, once created, cannot be modified. Instead of changing existing data, functional programs create new data structures with the desired changes.

  3. Pure Functions: Functions have no side effects and always return the same output for the same input, without modifying the input or any external state. This property makes code easier to reason about and test.

  4. Higher-Order Functions: Functions that can take other functions as arguments or return them as results. Examples include map, filter, and reduce.

  5. Recursion: Loops are replaced with recursion for iteration and repetition. Recursion is a natural fit in functional programming due to the lack of mutable state.

  6. Declarative Style: Emphasizes expressing the logic of a computation without describing its control flow. Instead of specifying how to do something, functional programming focuses on what to do.

Functional programming languages include Lisp, Scheme, Clojure, Haskell, Erlang, and others. Many mainstream languages, such as JavaScript, Python, and Java, support functional programming features to varying degrees.

About

Codes of Hackerrank and self practice of Functional programming are posted here

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages