Scala's for expression
Jun 14, 2016 · 3 min readThis blog article takes a deeper look into Scala's for comprehensions. The for comprehension / expression in Scala has the following syntax: 1 for ( seq ) yield expr In deed a very simple syntax underneath which lies a very strong fundamental concept. The seq in the syntax above could be a sequence of generators, …
Read MoreAccessing Tuples in Scala
May 13, 2016 · 1 min readScala seems to be like a gold mine, the more you dig into, the more you get. While you deal with tuples, when you want to access the elements of a tuple, you have to use the default numbering given to you by the Scala compiler. Say for example., you have a tuple as defined below: 1val myTuple = (31, "Joesan", …
Read MoreSealed Traits in Scala
Apr 6, 2016 · 2 min readYou probably know the idea behind using case classes and pattern matching them. Sometimes you might want the help of the compiler to tell you if you have pattern matched correctly by covering all possible cases. You can now get this sort of compiler support by creating a superclass for the case classes and marking them …
Read MoreLiner Interpolation
Jan 13, 2016 · 3 min readIn mathematics, linear interpolation is understood as a method of curve fitting using linear polynomials. A polynomial is just an expression that consists of variables along with their co-efficients. An example of a polynomial would be: 1x+2y² In the above equation, the variable x has 1 as its coefficient, the …
Read MoreBuilder, Strategy Patterns Still relevant?
Oct 22, 2015 · 5 min readIf you agree with me that writing less code equals lesser bugs, you are going to appreciate how Scala simplifies Strategy and Builder design patterns by making you write less code! Let's look at them one by one. Let us see how the Builder design pattern is implemented in Java. Builder Pattern Builder design pattern …
Read MoreFacts & Knowledge Nuggets
1 min readThis page exists for one single fact that upon a glance on the topic, you get your aha moment! Scala Co-Variant & Contra-Variant Spark SQL Joins
Read MorePrivacy Policy
1 min readUpdated on: 19.12.2021 This website does not collect any personally identifiable information that can be used to personally identify you. There are no cookies installed that could be used to individually track you. To learn more about cookies, please visit this website here. Links to third party websites This website …
Read More