MCPcopy
hub / github.com/destel/rill / universalMap

Function universalMap

transform_test.go:11–16  ·  view source on GitHub ↗
(ord bool, in <-chan Try[A], n int, f func(A) (B, error))

Source from the content-addressed store, hash-verified

9)
10
11func universalMap[A, B any](ord bool, in <-chan Try[A], n int, f func(A) (B, error)) <-chan Try[B] {
12 if ord {
13 return OrderedMap(in, n, f)
14 }
15 return Map(in, n, f)
16}
17
18func TestMap(t *testing.T) {
19 th.TestBothOrderings(t, func(t *testing.T, ord bool) {

Callers 1

TestMapFunction · 0.85

Calls 2

OrderedMapFunction · 0.85
MapFunction · 0.85

Tested by

no test coverage detected