Tailored string
val path = "/what/an/awesome/path"
How can I use Scala to create a list of absolute paths for each directory in the path? The result should be:
List(/what, /what/an, /what/an/awesome, /what/an/awesome/path)
Bonus points for an elegant, functional solution.
source
share