Thank you. Appreciate the feedback

By on 12/24/2008 3:57 PM ()

I'd of perhaps written:

1
2
3
4
5
6
7
8
9
open System.IO

let myFolder = @"C:\cygwin" 
let myDir = 
    seq { for file in Directory.GetFiles(myFolder) do 
            let file = new FileInfo(file) 
            yield (file.FullName, file.CreationTime, file.LastAccessTime) } 

myDir |> Seq.iter (fun file -> printfn "%A" file)

But there's nothing fundamentally wrong with what you wrote.

Cheers,
Rob

By on 12/24/2008 12:28 AM ()

the last line you could reduce to

1
2
myDir |> Seq.iter (printfn "%A")

but is this consideres a unnesesary reduction of code?

By on 12/24/2008 4:18 PM ()

In functional programming shortest is pretty much always the best, so "(printfn "%A")" is probably the correct thing to write. However, as the differnce is quite small I think either way is okay.

By on 12/25/2008 8:09 PM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper