Slide 10
Slide 10 text
* http://www.krishantha.com * https://www.youtube.com/krish * https://www.linkedin.com/in/krish-din/
Imperative programming Functional programming
Focus on how program works Focus on What is the objective (what to solve)
Easy learning curve Can be long learning curve on migrations
Functions, conditions, loops, and OOP concepts
available
Ideally to be stateless
Statement can change state of the program Use functions to create expressions rather statements.
We can use chains of functions
Eg: Java , C Eg: scala
If ( x%2==0 || x%3==0){
list.add(x);
}
var filetered=x=>{
return x%2==0 || x%3==0
}