0
votes
0answers
15 views

Elementary foldMap implementation

I think I got the implementation right, but I'm a bit unsure if this implementation will do fine in terms of space (stack) because I'm doing a foldRight. Would I ...
3
votes
1answer
78 views

Binary search in functional-style Scala

Curious to know how I can improve it, especially the pattern matching part seems a bit repetitive at the moment (lots of case x if ds(x)) ...
4
votes
0answers
50 views

Scala heap implementation

I'm Scala beginner, so if anyone would be so kind and give some feedback. ...
5
votes
2answers
77 views

Beginner Project: Bunny City

I am a Java programmer, and I just recently started learning Scala for fun. I found a group of projects here, and I tried to do the graduation excercise. The problem is, my code looks a lot like java, ...
1
vote
1answer
40 views

Pattern-matching function

I am new to Scala and I have written a function which uses pattern matching to filter words based on some conditions. It seems to work correctly but I am suspect that I haven't used the Scala pattern ...
2
votes
0answers
63 views

Slick database throttling trait based on the Playframework Slick plugin

I implemented a throttled database service trait for wrapping my service code in a future, supplying a slick session and throttling the # of requests in accordance to the length of the thread pool ...
3
votes
2answers
112 views

Partial octree implementation

I am just now learning Scala a bit on my own time. I wrote some code that works, but was wondering if you could eyeball it to see if its structure can be improved. It is a partial octree ...
6
votes
1answer
102 views

Idiomatic Scala try option code block

Trying to learn scala. Wanted to know if this is the standard way of doing things in Scala - or is there a better way to write this code ? Basically, this function returns a list of flights for an ...
6
votes
3answers
443 views

A scala implementation of the Java trim method

I'm a Scala beginner and looking at the trim() method of the Java API. I noticed side effects, so I attempted to implement a functional version in Scala. Here is ...
2
votes
1answer
175 views

First steps in Scala: does this look idiomatic?

I an a newcomer in the Scala world, and I would like some advice from more experienced people to find out whether what I am writing goes in the direction of idiomatic code. In particular, I have to ...
2
votes
3answers
316 views

Correct use of Option in scala?

I'm somewhat new to Scala and am not sure if I'm doing things in a very Scala-esque way. In particular, I'm not sure if I'm using Option correctly, since by ...