GitPedia

Transducers.jl

Efficient transducers for Julia

From JuliaFolds·Updated March 31, 2026·View on GitHub·

[![Stable documentation][docs-stable-img]][docs-stable-url] [![Latest documentation][docs-dev-img]][docs-dev-url] [![Travis Status][travis-img]][travis-url] [![codecov.io][codecov-img]][codecov-url] [![Coverage Status][coveralls-img]][coveralls-url] The project is written primarily in Julia, distributed under the MIT License license, first published in 2018. Key topics include: distributed-computing, high-performance, iterators, julia, map-reduce.

Latest release: v0.4.76

Transducers.jl: Efficient transducers for Julia

Stable documentation
Latest documentation
Travis Status
codecov.io
Coverage Status
Aqua QA

Transducers.jl provides composable algorithms on "sequence" of inputs.
They are called transducers, first introduced in Clojure language
by Rich Hickey.

Using transducers is quite straightforward, especially if you already
know similar concepts in iterator libraries:

julia
using Transducers 1:40 |> Partition(7) |> Filter(x -> prod(x) % 11 == 0) |> Cat() |> Scan(+) |> sum

However, the protocol used for the transducers is quite different from
iterators and results in a better performance for complex
compositions. Furthermore, some transducers support parallel
execution. If a transducer is composed of such transducers, it can be
automatically re-used both in sequential (foldl etc.) and parallel
(reduce etc.) contexts.

See more in the documentation.

If you are interested in parallel programming in general, see also:
A quick introduction to data parallelism in Julia

Installation

julia
using Pkg Pkg.add("Transducers")

Following packages are supported by Transducers.jl. In particular, they rely on
the Transducers.jl protocol to support multi-threading, multi-processing, and
GPU-based parallelism.

  • Folds.jl implements parallelized
    Base-like API based on Transducers.jl. This package can be used without
    knowing anything about transducers.
  • FLoops.jl provides for-loop
    syntax for using the loop executed by the Transducers.jl protocol.
  • BangBang.jl implements
    mutate-or-widen API. This is the foundation of
    typocalypse-free
    map/collect-like functions. Functions such as append!!,
    merge!!, mergewith!!, union!!, etc. are useful as a reducing
    function.
  • InitialValues.jl
    provides a framework for initial/identity element of folds.
  • MicroCollections.jl
    provides empty and singleton collections (arrays, dicts and sets).
    They are useful when writing transducers and reducing functions that
    construct a data collection.

Contributors

Showing top 12 contributors by commit count.

View all contributors on GitHub →

This article is auto-generated from JuliaFolds/Transducers.jl via the GitHub API.Last fetched: 6/22/2026