functional programming
funcion name_of_funtion(){
}
what is functional programming
By respecting these restrictions,
FP aims to write code that is clearer to understand and more bug resistant.
This is achieved by avoiding using flow-control statements
(for, while, break, continue, goto) which make the code harder to follow.
requires us to
write pure, deterministic
functions which are less likely to be buggy.
what is functional composition
const myResult = f1( f2(data) ); // composition: pass the output DATA of one function to the input of another ... like pipes.
function add(a){return function(b){return a + b} } // functional composition
add(2)(3) //-> 5
react functional component example
function Greeting(props) {
return <h1> Hello, {props.name}! </h1>
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us