Hi, Nala Ginrut <[email protected]> skribis:
> I don't mean 6 args is improper. But maybe some guys just want an easy > thing, and maybe Guile newbies need a easy start with 'scandir'. Oh, I just meant to say you could build ‘scandir’ (and others) atop ‘file-system-fold’. The scandir(3) C function is really meant to be a higher-order function but its interface is awkward and mixes different concerns (traversal and filtering.) Using something akin to the ‘directory-contents’ procedure I posted earlier, one could then use SRFI-1 to do actual filtering. > 'scandir' is a POSIX function, so many people will think it exists in Guile. > We have 'opendir' and 'readdir', but no 'scandir', that's strange. Yes, you’re right. However, I feel that we can come up with something both simpler and more expressive, as sketched above. WDYT? Thanks, Ludo'.
