Category Archives: Scala

Using TypeSafe’s Config In Scala

Using TypeSafe’s Config In Scala Our application behavior is generally defined with a set of configurations. Instead of hard-coding the values in the code, we like to define them separately in a configuration store. In this post, we are going to see how we can define configurations using TypeSafe’s config. Let’s create a SBT project…. Continue reading »

Compound Types in Scala

Compound Types in Scala In the previous post we looked at Mixin composition with traits in Scala. This post is about a similar concept, called Compound types. The syntax is exactly the same, it uses the familiar with keyword. But there is some differences. Mixins are used to define types or instantiating them. On the… Continue reading »

PartialFunction (Partially defined functions) In Scala

PartialFunction (Partially defined functions) In Scala A partial function is a unary function which is only defined for certain domain (i.e. input) values. They can be introduced anonymously. They can also be defined using PartialFunction trait. In order to understand partial functions, first introduce a type Student. It has three properties, id, sType and name… Continue reading »

Currying in Scala

Currying in Scala In our .net blog [shujaat.net], we have discussed about currying in details. Just to quote from there: Currying is a transformation technique in functional programming space. It is used to convert a function with multiple parameters to a set of functions with single parameter each. It can be used to create refined… Continue reading »