SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.
SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.
Successfully reported this slideshow.
Activate your 14 day free trial to unlock unlimited reading.
Discovering functional treasure in idiomatic Groovy
Discovering functional treasure in idiomatic Groovy
1.
Discovering Functional Treasure
in
Idiomatic Groovy
Naresha K
Enteleki Solutions
!
naresha.k@gmail.com
@naresha_k
2.
An imperative
language on JVM
A dynamic
with Functional Flavour
3.
The origin
http://radio-weblogs.com/0112098/2003/08/29.html
initial idea was to make a little dynamic language which
compiles directly to Java classes and provides all the nice
(alleged) productivity benefits
- James Strachan
36.
Recursion vs Iteration
println ages.inject(0) { s, item ->!
! s + item!
}
37.
The Ultimate Lesson
https://twitter.com/mfeathers/status/29581296216
38.
Functional Treasures
Functions as values (First class citizens)
Higher order functions
Curried Functions
Function Composition
Pure Functions (Immutability)
Tail Call Optimization
Memoization
Lazy Evaluation