Neil Mitchell ndmitchell at
Sun Jan 27 18:17:50 EST 2008


> That seems strange, actually.  I would expect, perhaps naively, that
>    takeDirectory == fst . splitFileName
>    dropFileName  == takeDirectory
> is there a good reason for these not to be true?

The original motivation was that:

uncurry (++) . splitFileName === id

And hence dropFileName = fst . splitFileName

However, in practice I think its more useful to use takeDirectory,
since usually the trailing slash gets in the way.

Those were the original reasons, but it is possible they were bad
reasons from the beginning.



More information about the Libraries mailing list