@@ -256,29 +256,7 @@ type Gather =
256
256
let cons_f x ys = Map.Invoke ( cons: 'a -> seq<_> -> seq<_>) ( f x) <.> ys
257
257
Seq.foldBack cons_ f t ( Pure.Invoke Seq.empty)
258
258
259
- (*
260
- static member inline Gather (t: _ NonEmptySeq, f, [<Optional>]_output: 'R, [<Optional>]_impl: Default3) =
261
- #if TEST_TRACE
262
- Traces.add "Gather NonEmptySeq"
263
- #endif
264
- let cons x y = seq {yield x; yield! y}
265
- let cons_f x ys = Map.Invoke (cons: 'a -> seq<_> -> seq<_>) (f x) <.> ys
266
- Map.Invoke NonEmptySeq.ofSeq (Seq.foldBack cons_f t (Pure.Invoke Seq.empty))
267
-
268
- static member inline Gather (t: seq<'T>, f: 'T -> '``Functor<'U>``, [<Optional>]_output: '``Functor<seq<'U>>``, [<Optional>]_impl: Default2) =
269
- #if TEST_TRACE
270
- Traces.add "Gather seq, 'T -> Functor<'U>"
271
- #endif
272
- let mapped = Seq.map f t
273
- Transpose.ForInfiniteSequences (mapped, IsZipLeftZero.Invoke, List.toSeq, Pure.Invoke) : '``Functor<seq<'U>>``
274
-
275
- static member inline Gather (t: NonEmptySeq<'T>, f: 'T -> '``Functor<'U>``, [<Optional>]_output: '``Functor<NonEmptySeq<'U>>``, [<Optional>]_impl: Default2) =
276
- #if TEST_TRACE
277
- Traces.add "Gather NonEmptySeq, 'T -> Functor<'U>"
278
- #endif
279
- let mapped = NonEmptySeq.map f t
280
- Transpose.ForInfiniteSequences (mapped, IsZipLeftZero.Invoke, NonEmptySeq.ofList, Pure.Invoke) : '``Functor<NonEmptySeq<'U>>``
281
- *)
259
+
282
260
283
261
static member inline Gather ( t : ^a , f , [<Optional>] _output : 'R , [<Optional>] _impl : Default1 ) : 'R =
284
262
#if TEST_ TRACE
@@ -300,20 +278,6 @@ type Gather =
300
278
yield Async.AsTask( f enum .Current, cancellationToken = ct). Result }}
301
279
#endif
302
280
303
- (*
304
- #if !FABLE_COMPILER
305
- static member Gather (t: 't NonEmptySeq, f: 't -> Async<'u>, [<Optional>]_output: Async<NonEmptySeq<'u>>, [<Optional>]_impl: Gather) : Async<NonEmptySeq<_>> = async {
306
- #if TEST_TRACE
307
- Traces.add "Gather 't NonEmptySeq, 't -> Async<'u>"
308
- #endif
309
-
310
- let! ct = Async.CancellationToken
311
- return seq {
312
- use enum = t.GetEnumerator ()
313
- while enum.MoveNext() do
314
- yield Async.AsTask(f enum.Current, cancellationToken = ct).Result } |> NonEmptySeq.unsafeOfSeq }
315
- #endif
316
- *)
317
281
318
282
static member Gather ( t : Id < 't >, f : 't -> option < 'u >, [<Optional>] _output : option < Id < 'u >>, [<Optional>] _impl : Gather ) =
319
283
#if TEST_ TRACE
@@ -408,18 +372,6 @@ type Transpose with
408
372
static member Transpose ( t : seq < Async < 't >> , [<Optional>] _output : Async < seq < 't >> , [<Optional>] _impl : Default3 ) : Async < seq < 't >> = Async.Parallel t |> Async.map Array.toSeq
409
373
#endif
410
374
411
- (*
412
- static member inline Transpose (t: NonEmptySeq<'``Applicative<'T>``>, [<Optional>]_output: '``Applicative<NonEmptySeq<'T>>``, [<Optional>]_impl: Default4) : '``Applicative<NonEmptySeq<'T>>`` = Transpose.ForInfiniteSequences (t, IsZipLeftZero.Invoke, NonEmptySeq.ofList, fun _ -> Unchecked.defaultof<_>)
413
- static member Transpose (t: NonEmptySeq<option<'t>> , [<Optional>]_output: option<NonEmptySeq<'t>> , [<Optional>]_impl: Default3) : option<NonEmptySeq<'t>> = Option.Sequential t |> Option.map NonEmptySeq.unsafeOfSeq
414
- static member inline Transpose (t: NonEmptySeq<Result<'t,'e>>, [<Optional>]_output: Result<NonEmptySeq<'t>, 'e>, [<Optional>]_impl: Default3) : Result<NonEmptySeq<'t>, 'e> = Result.Parallel ((++), t) |> Result.map NonEmptySeq.unsafeOfSeq
415
- static member inline Transpose (t: NonEmptySeq<Choice<'t,'e>>, [<Optional>]_output: Choice<NonEmptySeq<'t>, 'e>, [<Optional>]_impl: Default3) : Choice<NonEmptySeq<'t>, 'e> = Choice.Parallel ((++), t) |> Choice.map NonEmptySeq.unsafeOfSeq
416
- static member Transpose (t: NonEmptySeq<list<'t>> , [<Optional>]_output: list<NonEmptySeq<'t>> , [<Optional>]_impl: Default3) : list<NonEmptySeq<'t>> = Transpose.ForInfiniteSequences (t, List.isEmpty , NonEmptySeq.ofList, fun _ -> Unchecked.defaultof<_>)
417
- static member Transpose (t: NonEmptySeq<'t []> , [<Optional>]_output: NonEmptySeq<'t> [] , [<Optional>]_impl: Default3) : NonEmptySeq<'t> [] = Transpose.ForInfiniteSequences (t, Array.isEmpty, NonEmptySeq.ofList, fun _ -> Unchecked.defaultof<_>)
418
- #if !FABLE_COMPILER
419
- static member Transpose (t: NonEmptySeq<Async<'t>> , [<Optional>]_output: Async<NonEmptySeq<'t>> , [<Optional>]_impl: Default3) = Async.Parallel t |> Async.map NonEmptySeq.unsafeOfSeq : Async<NonEmptySeq<'t>>
420
- #endif
421
- *)
422
-
423
375
static member inline Transpose ( t : ^a , [<Optional>] _output : 'R , [<Optional>] _impl : Default2 ) : 'R = Gather.InvokeOnInstance id t
424
376
static member inline Transpose ( t : ^a , [<Optional>] _output : 'R , [<Optional>] _impl : Default1 ) : 'R = Transpose.InvokeOnInstance t
425
377
0 commit comments