Login
|
Signup
langref.org
-
python
,
clojure
, and
csharp
add..
all
cpp
erlang
fantom
fsharp
go
groovy
haskell
java
ocaml
perl
php
ruby
scala
Home
All
Solved
Unsolved
Strings
Numbers
Regex
Lists
Maps
Structure
Files
Dates
OOP
Networking
XML
Algorithms
Misc
Parallel
View Problem
Files
Directories
Process each file in a directory recursively
python
2.4
import os
results = (process(os.path.join(p, n)) for p,d,l in os.walk(".") for n in l)
import os
results = (process(os.path.join(p, n)) for p,d,l in os.walk(".") for n in l)
clojure
; (defn process-file [f] "process one file" body...)
(map process-file (file-seq (File. ".")))
(import '(java.io File))
; (defn process-file [f] "process one file" body...)
(map process-file (file-seq (File. ".")))
Submit a new solution for
python
,
clojure
, or
csharp
There are 14 other solutions in
additional
languages (
cpp
,
erlang
,
fantom
,
fsharp
...)