Operators like +, – , * and so on are actually not operators in traditional sense in Scala language. They all are methods. :). Scala language provides a relaxed syntax when it comes to method invocations. The dot (.) and […]
Scala provides a concept called partially applied functions that spares you from writing several lines of code. Say, you have a function f that accepts 2 arguments. While invoking f you may have to pass both the arguments. In Scala […]
Continuing with the posts on Scala where we implemented Guessing game in imperative style and a in a couple of ways using the functional style, let’s implement it using pattern matching facility. Pattern matching provided in Scala is one of […]
In the previous post, we created the GuessingGame as a functional object that was immutable. It was a little heavy as every operation resulted in a new object. Let’s refactor it a but and see where we land. All that’s […]
In the earlier post on Scala, we created the Guessing Game class using imperative style. Now you’ve the GuessingGame class implemented using functional style. This is the first attempt in doing that. Couple of points to keep in mind here […]