Skip to content

Commit

Permalink
- duplication after merge
Browse files Browse the repository at this point in the history
  • Loading branch information
gusty committed Jan 13, 2024
1 parent 72bcb90 commit 14faf0b
Showing 1 changed file with 0 additions and 37 deletions.
37 changes: 0 additions & 37 deletions src/FSharpPlus/Extensions/Async.fs
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,6 @@ module Async =
let! b = y
return f a b }

/// <summary>Creates an async workflow from two workflows 'x' and 'y', mapping its results with 'f'.</summary>
/// <remarks>Similar to map2 but workflows are run in parallel.</remarks>
/// <param name="f">The mapping function.</param>
/// <param name="x">First async workflow.</param>
/// <param name="y">Second async workflow.</param>
#if FABLE_COMPILER
let pmap2 f x y = map2 f x y
#else
let pmap2 f x y = async {
let! ct = Async.CancellationToken
let x = Async.StartImmediateAsTask (x, ct)
let y = Async.StartImmediateAsTask (y, ct)
let! x' = Async.AwaitTask x
let! y' = Async.AwaitTask y
return f x' y' }
#endif

/// <summary>Creates an async workflow from three workflows 'x', 'y' and 'z', mapping its results with 'f'.</summary>
/// <remarks>Workflows are run in sequence. For parallel use pmap3</remarks>
/// <param name="f">The mapping function.</param>
Expand All @@ -48,26 +31,6 @@ module Async =
let! c = z
return f a b c }

/// <summary>Creates an async workflow from three workflows 'x', 'y' and 'z', mapping its results with 'f'.</summary>
/// <remarks>Similar to map3 but workflows are run in parallel.</remarks>
/// <param name="f">The mapping function.</param>
/// <param name="x">First async workflow.</param>
/// <param name="y">Second async workflow.</param>
/// <param name="z">third async workflow.</param>
#if FABLE_COMPILER
let pmap3 f x y z = map3 f x y z
#else
let pmap3 f x y z = async {
let! ct = Async.CancellationToken
let x = Async.StartImmediateAsTask (x, ct)
let y = Async.StartImmediateAsTask (y, ct)
let z = Async.StartImmediateAsTask (z, ct)
let! x' = Async.AwaitTask x
let! y' = Async.AwaitTask y
let! z' = Async.AwaitTask z
return f x' y' z' }
#endif

/// <summary>Creates an async workflow from two workflows 'x' and 'y', mapping its results with 'f'.</summary>
/// <remarks>Similar to map2 but workflows are run in parallel.</remarks>
/// <param name="f">The mapping function.</param>
Expand Down

0 comments on commit 14faf0b

Please sign in to comment.