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