Advertisement
pro_cessor

F# Path Walk with filtering

Sep 6th, 2012
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
F# 0.36 KB | None | 0 0
  1. // Geht das noch besser?
  2. // Mal abgesehen davon dass der Filter nicht benutzt wird!
  3.  
  4.  
  5. let rec walk filter path =
  6.     let files =  path |> Directory.GetFiles |> List.ofSeq |> List.filter filter
  7.     files @ (path |> Directory.GetDirectories |> List.ofSeq |> (List.collect (walk filter)))
  8.  
  9. // val walk : filter:(string -> bool) -> path:string -> string list
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement