Tagged Questions
1
vote
1answer
143 views
Functional Exception handling with TryCatchFinally Statement helpers
Hello All, I wrote something to the effect of a try catch finally statement helper in functional style so that I can shorten much of the code I'm writing for my Service Layer that connects to a sql ...
5
votes
3answers
286 views
Scala: a safer way to cut string
I want to get just the first line of a big string. Currently, here's how I do it:
def getFirstParagraph(txt: String) = {
val newLineIdx = txt.indexOf("\n") match {
case i: Int if i > 0 ...