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

JuliaFolds / Transducers.jl / 1738 / 3
93%
master: 93%

Build:
DEFAULT BRANCH: master
Ran 04 Jul 2020 07:31AM UTC
Files 25
Run time 2s
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

04 Jul 2020 07:17AM UTC coverage: 65.09% (-21.3%) from 86.373%
JULIA_NUM_THREADS=2 COVERALLS_PARALLEL=true

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.

867 of 1332 relevant lines covered (65.09%)

24612.55 hits per line

Source Files on job 1738.3 (JULIA_NUM_THREADS=2 COVERALLS_PARALLEL=true)
  • Tree
  • List 0
  • Changed 24
  • Source Changed 17
  • Coverage Changed 24
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 1476
  • Travis Job 1738.3
  • f2ab3d02 on github
  • Prev Job for JULIA_NUM_THREADS=2 COVERALLS_PARALLEL=true on master (#1733.2)
  • Next Job for JULIA_NUM_THREADS=2 COVERALLS_PARALLEL=true on master (#1740.1)
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