> else if 0 = size dir then file Actually, this test will be wrong on Windows, where dir can be a path with no arcs but a volume. :( The obvious correct implementation is fun joinDirFile {dir, file} = let val {isAbs, vol, arcs} = fromString dir in toString {isAbs=isAbs, vol=vol, arcs=arcs@[file]} end Slightly suboptimal efficiency-wise, though...