Factor script to change case of all filenames in a directory In the absence of a full-fledged tutorial, I am teaching myself to program in the Factor language by writing a bunch of functions that I will eventually use in command-line scripts.

One common operation I like to perform is to change the case of names of files contained in a given directory to uppercase or lowercase.  I wrote the following code to perform this operation in Factor:

USING: fry kernel io.directories sequences unicode.case ;
IN: util.directories

: move-each-directory-file&gt;lower ( pathname -- )
    [ dup &gt;lower ] move-each-directory-file ;

: move-each-directory-file&gt;upper ( pathname -- )
    [ dup &gt;upper ] move-each-directory-file ;

: each-directory-file ( pathname quot -- )
    '[ [ @ ] each ] with-directory-files ; inline

: move-each-directory-file ( pathname quot -- )
    '[ @ move-file ] each-directory-file ; inline


I have tried to factor as much code as possible into a reusable vocabulary.  I look forward to suggestions for improvement.
Comments! Comments are good, especially to people who are just learning Factor right now. Admittedly, for Factor, it's pretty readable -- I finally got it, after staring a while and doing lots of Googling -- but comments are always nice.

I can't find anything about the : name&gt;something ( etc -- etc ) word syntax online -- namely, the &gt;something part. Because of that, I'm just gonna assume that it's good syntax and move on. Alright, I finally found it! And yes, that's good syntax -- you're supposed to use a&gt;b for functions converting a to b, and that's exactly what you do. It might be better called directory-file-names&gt;upper/&gt;lower, but that's just personal preference.

It looks good, though. After figuring out how Factor works, it's pretty readable (for Factor), and actually makes me want to use the language more. Plus, as far as I can tell, you're following the official coding style to the letter. Well done.