Building a Tree from Breadcrumbs
It looks like you need a variation of the prefix sum algorithm applied to your list. In Scala this can be accomplished with scan:

val xs = List("home", "mens", "clothing", "jackets")
xs.scan("")(_ + "/" + _).tail