It can be even simplified to a simple one-liner: `...
# stdlib
v
It can be even simplified to a simple one-liner:
Copy code
fun paths(base: File, vararg pathSegments: String): File {
  return pathSegments.fold(base) { file, segment -> File(file, segment) }
}