You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Binds a function that returns an asynchronous computation to a validation context.
6
+
/// Binds a function that returns an asynchronous validation context to a validation context.
7
7
/// </summary>
8
8
/// <remarks>
9
9
/// This function takes a function <c>fn</c> that transforms a value of type <c>'A</c> into an
10
-
/// asynchronous computation of type <c>Async<VCtx<'F, 'B>></c> and a validation context <c>c</c>
11
-
/// of type <c>VCtx<'F, 'A></c>. It returns an asynchronous computation of type <c>Async<VCtx<'F, 'B>></c>.
10
+
/// asynchronous validation context of type <c>Async<VCtx<'F, 'B>></c> and a validation context <c>c</c>
11
+
/// of type <c>VCtx<'F, 'A></c>. It returns an asynchronous validation context of type <c>Async<VCtx<'F, 'B>></c>.
12
12
///
13
13
/// The function handles the following cases:
14
14
/// <list type="bullet">
@@ -23,9 +23,9 @@ module VCtx =
23
23
/// </item>
24
24
/// </list>
25
25
/// </remarks>
26
-
/// <param name="fn">A function that takes a value of type <c>'A</c> and returns an asynchronous computation of type <c>Async<VCtx<'F, 'B>></c>.</param>
26
+
/// <param name="fn">A function that takes a value of type <c>'A</c> and returns an asynchronous validation context of type <c>Async<VCtx<'F, 'B>></c>.</param>
27
27
/// <param name="c">A validation context of type <c>VCtx<'F, 'A></c>.</param>
28
-
/// <returns>An asynchronous computation of type <c>Async<VCtx<'F, 'B>></c>.</returns>
28
+
/// <returns>An asynchronous validation context of type <c>Async<VCtx<'F, 'B>></c>.</returns>
/// Merge sources of two asynchronous computations of validation contexts into a single asynchronous validation context.
75
+
/// </summary>
76
+
/// <remarks>
77
+
/// This function takes two asynchronous validation contexts <c>c1</c> and <c>c2</c> of type <c>Async<VCtx<'F, 'A>></c>
78
+
/// and returns an asynchronous computation of type <c>Async<VCtx<'F, 'A * 'B>></c> that merges the results.
79
+
/// </remarks>
80
+
/// <param name="c1">An asynchronous computation of type <c>Async<VCtx<'F, 'A>></c>.</param>
81
+
/// <param name="c2">An asynchronous computation of type <c>Async<VCtx<'F, 'B>></c>.</param>
82
+
/// <returns>An asynchronous computation of type <c>Async<VCtx<'F, 'A * 'B>></c>.</returns>
83
+
/// <seealso cref="VCtx.mergeSources"/>
84
+
letmergeSourcesAsync
85
+
(c1:Async<VCtx<'F,'A>>)
86
+
(c2:Async<VCtx<'F,'B>>)
87
+
:Async<VCtx<'F,'A * 'B>>=
88
+
async{
89
+
let!a= c1
90
+
let!b= c2
91
+
return VCtx.mergeSources a b
92
+
}
93
+
94
+
/// <summary>
95
+
/// Binds a function that returns an asynchronous validation context to an asynchronous validation context and merges the results.
96
+
/// </summary>
97
+
/// <remarks>
98
+
/// This function takes a function <c>fn</c> that transforms a value of type <c>'A</c> into an asynchronous computation
99
+
/// of type <c>Async<VCtx<'F, 'B>></c> and an asynchronous computation <c>c</c> of type <c>Async<VCtx<'F, 'A>></c>.
100
+
/// It returns an asynchronous validation context of type <c>Async<VCtx<'F, 'A * 'B>></c> that merges the results.
101
+
/// </remarks>
102
+
/// <param name="fn">A function that takes a value of type <c>'A</c> and returns an asynchronous validation computation of type <c>Async<VCtx<'F, 'B>></c>.</param>
103
+
/// <param name="c">An asynchronous validation context of type <c>Async<VCtx<'F, 'A>></c>.</param>
104
+
/// <returns>An asynchronous validation context of type <c>Async<VCtx<'F, 'A * 'B>></c>.</returns>
105
+
/// <seealso cref="VCtx.bindAsync"/>
106
+
/// <seealso cref="VCtx.mergeSourcesAsync"/>
107
+
letbindAndMergeSourcesAsync
108
+
(fn:'A ->Async<VCtx<'F,'B>>)
109
+
(c:Async<VCtx<'F,'A>>)
110
+
:Async<VCtx<'F,'A * 'B>>=
111
+
bindAsync fn c |> mergeSourcesAsync c
112
+
113
+
/// <summary>
114
+
/// Binds a function that returns an asynchronous validation context to a validation context and merges the results.
115
+
/// </summary>
116
+
/// <remarks>
117
+
/// This function takes a function <c>fn</c> that transforms a value of type <c>'A</c> into an
118
+
/// asynchronous validation context of type <c>Async<VCtx<'F, 'B>></c> and a validation context <c>c</c>
119
+
/// of type <c>VCtx<'F, 'A></c>. It returns an asynchronous validation context of type <c>Async<VCtx<'F, 'B>></c>.
120
+
/// </remarks>
121
+
/// <param name="fn">A function that takes a value of type <c>'A</c> and returns an asynchronous validation context of type <c>Async<VCtx<'F, 'B>></c>.</param>
122
+
/// <param name="c">A validation context of type <c>VCtx<'F, 'A></c>.</param>
123
+
/// <returns>An asynchronous validation context of type <c>Async<VCtx<'F, 'B>></c>.</returns>
0 commit comments