4 ms·
That's because an async computation is not a task. So use the task computation either through a nuget on < F# 6.0 or build in >= F# 6.0 let readFilesTask (pa
by DerHardt 5y ago
That's because an async computation is not a task. So use the task computation either through a nuget on < F# 6.0 or build in >= F# 6.0
let readFilesTask (path1, path2) =
task {
let! bytes1 = File.ReadAllBytesAsync(path1)
let! bytes2 = File.ReadAllBytesAsync(path2)
return Array.append bytes1 bytes2
}