File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
src/FSharp.Control.TaskSeq Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -195,6 +195,7 @@ module internal TaskSeqInternal =
195195 return acc
196196 }
197197
198+ // 'compare' is either `<` or `>` (i.e, less-than, greater-than resp.)
198199 let inline maxMinBy ( [<InlineIfLambda>] compare ) ( [<InlineIfLambda>] projection ) ( source : TaskSeq < _ >) =
199200 checkNonNull ( nameof source) source
200201
@@ -213,14 +214,14 @@ module internal TaskSeqInternal =
213214 let value = e.Current
214215 let currentProjection = projection value
215216
216- if compare currentProjection accProjection then
217+ if compare accProjection currentProjection then
217218 accProjection <- currentProjection
218219 accValue <- value
219220
220221 return accValue
221222 }
222223
223-
224+ // 'compare' is either `<` or `>` (i.e, less-than, greater-than resp.)
224225 let inline maxMinByAsync ( [<InlineIfLambda>] compare ) ( [<InlineIfLambda>] projectionAsync ) ( source : TaskSeq < _ >) =
225226 checkNonNull ( nameof source) source
226227
@@ -240,7 +241,7 @@ module internal TaskSeqInternal =
240241 let value = e.Current
241242 let! currentProjection = projectionAsync value
242243
243- if compare currentProjection accProjection then
244+ if compare accProjection currentProjection then
244245 accProjection <- currentProjection
245246 accValue <- value
246247
You can’t perform that action at this time.
0 commit comments