Category Archives: Functional Programming

ScalaFP: Understanding Monoids In Scala Pragmatically


As we discussed in our previous post, Monoids are semigroups meaning they have properties called closure and associative, along with identity element. So, now our question is, why do we require the identity element? Let’s add this one to our questions which … Continue reading

Posted in Scala, Functional Programming | Tagged , , , , , , , , , | 3 Comments

ScalaFP: Let’s Begin With Monoids


As we discussed in our semigroups post, monoids are also kind of functional design patterns. Most of the FP beginners are always confused between Monads and Monoids. According to them both are the same, Is It? In this post, we will be … Continue reading

Posted in Functional Programming, Scala | Tagged , , , , , , , , | 5 Comments

ScalaFP: Understanding Semigroups In Scala Pragmatically


In our previous post, we discussed semigroups according to mathematics and we conclude that semigroups have two properties called closure and associativity. But still, we have some questions like: How can we use semigroups by using Scala? Where do we … Continue reading

Posted in Functional Programming, Scala | Tagged , , , , , , , , , | 3 Comments

Java 10: Let’s play with var


Oracle is finally up to a time-bound release of java and announced the general availability of Java 10 on March 20, 2018, as part of the new six-month release cycle. This release introduced twelve new enhancements defined by JEPS(JDK Enhancements … Continue reading

Posted in Functional Programming, Java | 1 Comment

ScalaFP: Let’s Begin With Semigroups.


While we start looking into functional programming, the first thing we find out is “Category Theory” and if you are not a mathematician, then, it is really a huge pain to find out the answers to questions like “what, how … Continue reading

Posted in Functional Programming, Scala | Tagged , , , , , , , , , , | 6 Comments

Back2Basics: The Story of Trait – Part 2


In our previous blog The Story of Trait – Part 1, we have discussed how traits are the just regular interfaces at the very basic form. In this blog, we will explore about traits can have method implementation too. We … Continue reading

Posted in Functional Programming, Scala | Tagged , , , , , , , , , | 8 Comments

Back2Basics: The Story of Trait – Part 1


In this blog, we will have a look at traits in Scala. We have classes in Scala. Suppose we have a class Dog which has a method speak. Now if we want another class Cat which has the same method … Continue reading

Posted in Functional Programming, Scala | Tagged , , , , , | 6 Comments

Java 9 Improvements-1


There are a couple of improvements in Java 9. We will cover it one by one with the examples of each. 1.) Interface private methods: In Java 9, we can create private methods in interfaces. The use case is very simple: similar … Continue reading

Posted in Functional Programming, Java, Scala | Leave a comment

Getting Lazy With Scala


In this blog, we will talk about lazy evaluation in Scala. How we can add efficiency to our application? Efficiency is achieved not just by running things faster, but by avoiding things that shouldn’t be done in the first place. … Continue reading

Posted in Functional Programming, Scala | Tagged , , , , , , , , | 2 Comments

Working with XML in Scala


In this blog, we will talk about how we can work with XML using Scala. Scala treats XML as the first-class citizen. So, instead of embedding XML documents into strings. , you can place them inline in your code like … Continue reading

Posted in Functional Programming, Scala | Tagged , , | 2 Comments