Showing posts from December, 2021

Cool new stream about F# from LaylaCodesIt

There was a cool new series about F# on Twitch today.  It was fun to see and I haven't used F# in a long time. I felt like it was my first time while watching the stream.  Here is my code inspired by Layla and Alyssa. or if you want the whole project... It just reads from a text file and prints the contents out to the console. // For more information see printfn "Console App: Started!" open System.IO let baseDirectory = __SOURCE_DIRECTORY__ let filePath = "Text.txt" let fullPath = Path.Combine(baseDirectory, filePath) let readFilesTask (path1) =   task {     let! content = File.ReadAllTextAsync(path1)     return content   } printfn "Content: %s" (readFilesTask(fullPath).Result)