Re:Tour of F#
by jackmott on Wednesday February 22, 2017 @10:56PM
(#13711498)
https://gist.github.com/jackmott/988b4742394cf5e7d331e31c0ee...
[ Parent
| on HN ]
Re:Tour of F#
by insulanian on Wednesday February 22, 2017 @11:35PM
(#13711665)
For starters this is enough and less confusing IMHO:
open System.IO
for line in File.ReadLines("/path/to/file") do
printfn "%s" line
Re:Tour of F#
by enricosada on Thursday February 23, 2017 @04:45AM
(#13712730)
Or using awesome |> pipeline operator
"/path/to/file"
|> File.ReadLines
|> Seq.iter (printfn "%s")
the printfn can be expanded as function, instead of partial app "/path/to/file"
|> File.ReadLines
|> Seq.iter (fun line -> printfn "%s" line)
Re:Tour of F#
by throwaway7645 on Thursday February 23, 2017 @08:18AM
(#13713560)
If you could make about 50 more of these snippets...I'd be using F# everyday :)
boom
http://fssnip.net/
Re:Tour of F#
by throwaway7645 on Thursday February 23, 2017 @01:24PM
(#13716313)
Haha, I almost forgot about this. Thanks!