edit-article
Home
Up
Delete
Article Name:
Article Description:
what-is-functional-programming - by Don Sagrott, founder @sospep.com - an overview look at the functional programming paradigm.
Chapter ID/Name:
Status:
Write
Writing
Written
Add Photo:
Owner ID:
Content:
use HTML
<h1 style="text-align: center;">what is functional programming</h1> <h2>[WHAT]</h2> <ol> <li><strong>[] what is funcitonal programming - by Don Sagrott, founder @ sospep.com -</strong></li> <ol> <li>[] functional programming is a programming paradigm where programs are designed/constructed of mathematical functions</li> <li>[] functional programs avoid changing state</li> <li>[] functional program avoid muteable data</li> <li>[] pure functions ( that have no side effects)</li> </ol> <li><strong>[] <a href="https://en.wikipedia.org/wiki/Functional_programming" target="_blank">what is functional programming?</a></strong></li> <ol> <li>[] a programming pardadigm where computation is treated as the evaluation of mathematical functions, avoids changing state and muteable data,</li> <li>[] a declarative (versus an imperative) programming paradigm, where programming is done with expressions or declarations VS statements</li> <li>[] In functional code, the output value of a function depends only on its arguments, so calling a function with the same value for an argument always produces the same result. This is in contrast to imperative programming where, in addition to a function's arguments, global program state can affect a function's resulting value. Eliminating side effects, that is, changes in state that do not depend on the function inputs, can make understanding a program easier, which is one of the key motivations for the development of functional programming.</li> <li>[] key concepts include [] pure functions, [] higher order functions,</li> </ol> <li><strong>[] what is a functional programming language?</strong></li> <ol> <li>[] some examples of FP languages include - lisp, scheme, clojure, haskell, f#</li> <li>[] state of fp, where lisp is the granddaddy, clojure is the popular, f# is msft's baby</li> </ol></ol> <h2>[WHY]</h2> <ol> <li>]</li> </ol> <h2>[WHERE]</h2> <ol> <li><strong>] READ THE FULL ARTICLE</strong></li> <ol> <li>] this is it</li> </ol></ol> <h2>[WHEN]</h2> <ol> <li>] 2019-11-05</li> </ol> <h2>[EXAMPLE]</h2> <ol> <li>]</li> </ol> <h2>[HOW-TO]</h2> <ol> <li>]</li> </ol> <h2>[REFERENCE]</h2> <ol> <li>[] <a href="/view/article?id=1663" target="_blank">table of contents - BOOK -language-javascript</a> (this)</li> <li>[] <a href="https://en.wikipedia.org/wiki/Functional_programming" target="_blank">https://en.wikipedia.org/wiki/Functional_programming <br /></a></li> <li>[] g?= compare declarative and imperative programming</li> <li>[] https://tylermcginnis.com/imperative-vs-declarative-programming/</li> </ol> <div><strong>[double]</strong></div> <div>[] function double(arg){ elms =[]; arg.forEach( (elm) => { elms.push(elm *2)} ); return elms;};</div> <div><strong>[add]</strong></div> <div>[] function add2(args){const total = (accumulator, currentValue) => accumulator + currentValue; return args.reduce(total) };</div> <h1 style="text-align: center;"> </h1>