Tag Archives: Lambdas

Unleash functional power on Android (I): Kotlin lambdas

via Unleash functional power on Android (I): Kotlin lambdas.

The functional programming can be a really powerful tool when used properly, and though Java 8 includes some functional tools, as you can imagine Android Developers won’t be able to use it very soon (or even never). So many alternative languages are starting to emerge to solve this problem.

Closures in JavaScript and PHP: Side By Side

via Closures in JavaScript and PHP: Side By Side.

Closures, as a quick internet search will soon tell us, are functions that have access to or ‘knowledge of’ variables not defined within themselves i.e. variables outside their scope. The first example demonstrates this in JavaScript, a language in which anonymous functions (also known as lambdas) and closures are well established, frequently used, and powerful features. The second example will recreate this using PHP, a language in which lambdas and closures are relatively new additions (available since PHP 5.3).

How to Translate SQL GROUP BY and Aggregations to Java 8

I couldn’t resist. I have read this question by Hugo Prudente on Stack Overflow. And I knew there had to be a better way than what the JDK has to offer. The question reads: I’m looking for a lambda to refine the data already retrieved. I have a raw resultset, if the user do not […]


Object Functional Paradigm – Subsume the Strategy Pattern

inspired by quote from Venkat Subramanium in his book “Functional Programming in Java 8”.
“The common, familiar design patterns are more approachable when we design with lambda expressions; we need fewer lines of code, classes, and interfaces, and far less ceremony to implement our designs.”
Other inspirations are Dhaval Dalal who lately got us introduced to Functional Programming. And lastly Naresh Jain whose Object Boot Camp provoked a thought of building a good habit of writing Blogs for our own good.


Elegant Factory using Functions as first class citizens

The main intent behind a Factory pattern described generically is to  “Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclass.” Factory pattern is one of the commonly applicable pattern […]


Acting In C++

Because they’re a perfect fit for mega-core processors and they’re safer and more enjoyable to program than raw, multi-threaded, systems, I’ve been a fan of Actor-based concurrent systems ever since I experimented with Erlang and Akka (via its Java API). Thus, as a C++ programmer, I was excited to discover the “C++ Actor Framework” (CAF). […]


JDK 8 Massive Open, Free and Online Course: Lambdas and Streams – Starts July 14th 2015 Introduction by Simon Ritter

Java SE 8 (JDK 8) introduced a fundamentally new way of programming in Java with the introduction of Lambda expressions. Lambda provides a simple way to pass functionality as an argument to another method, such as what action should be taken when someone clicks a button, or how to sort a set of names. Lambda […]