Skip to content

Instantly share code, notes, and snippets.

@dgfitch
Created November 15, 2010 16:54
Show Gist options
  • Save dgfitch/700590 to your computer and use it in GitHub Desktop.
Save dgfitch/700590 to your computer and use it in GitHub Desktop.
visitor.fs
let rec visitor dir =
seq { yield!
( try Directory.GetFiles(dir)
with ex ->
(* actually do something *)
Array.empty )
for subdir in Directory.GetDirectories(dir) do yield! visitor subdir}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment