• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

JuliaFolds / Transducers.jl / 1738
93%

Build:
DEFAULT BRANCH: master
Ran 04 Jul 2020 07:29AM UTC
Jobs 3
Files 25
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
1738

push

travis-ci-com

web-flow
Treat transducers as iterator transforms at surface syntax (#319)

This patch implements the idea discussed in #67.  That is to say,

```julia
collect(Map(f) |> Filter(g), xs)
foldl(+, Map(f) |> Filter(g), xs)
```

is now written as

```julia
xs |> Map(f) |> Filter(g) |> collect
foldl(+, xs |> Map(f) |> Filter(g))
```

or

```julia
collect(opcompose(Map(f), Filter(g)), xs)
foldl(+, opcompose(Map(f), Filter(g)), xs)

collect(Map(f) ⨟ Filter(g), xs)
foldl(+, Map(f) ⨟ Filter(g), xs)
```

or even (not recommended)

```julia
collect(Filter(g)((Map(f)(xs))))  # Julia >= 1.3

collect(Filter(g) ∘ Map(f), xs)
foldl(+, Filter(g) ∘ Map(f), xs)

collect((Filter(g)' ⨟ Map(f)')', xs)
foldl(+, (Filter(g)' ⨟ Map(f)')', xs)

collect((Map(f)' ∘ Filter(g)')', xs)
foldl(+, (Map(f)' ∘ Filter(g)')', xs)
```

Above syntax are all compatible with the view that `xf(itr)` is an
iterator transformation.  OTOH, `xf'` (`adjoint(::Transducer)`) is now
the "classic" transducer; i.e., reducing function transformation.
This makes it easy to use transducers with other "reducing function
combinators" like `TeeRF`:

```julia
rf = TeeRF(Filter(iseven)'(min), Filter(isodd)'(max))
reduce(rf, Map(identity), xs)  # => (even minimum, odd maximum)
```

This PR only deprecates `::Transducer |> ::Transducer` to help
migration from the old syntax.

1201 of 1297 relevant lines covered (92.6%)

3815316.88 hits per line

Jobs
ID Job ID Ran Files Coverage
1 1738.1 (JULIA_NUM_THREADS=2 COVERALLS_PARALLEL=true) 04 Jul 2020 07:31AM UTC 0
85.2
Travis Job 1738.1
2 1738.2 (JULIA_NUM_THREADS=2 COVERALLS_PARALLEL=true) 04 Jul 2020 07:29AM UTC 0
85.58
Travis Job 1738.2
3 1738.3 (JULIA_NUM_THREADS=2 COVERALLS_PARALLEL=true) 04 Jul 2020 07:31AM UTC 0
65.09
Travis Job 1738.3
Source Files on build 1738
Detailed source file information is not available for this build.
  • Back to Repo
  • Build #1738
  • f2ab3d02 on github
  • Prev Build on master (#1733)
  • Next Build on master (#1740)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc