Skip to content

Commit

Permalink
feat: interceptor based transformers
Browse files Browse the repository at this point in the history
See the idea surfaced in metosin#114.

This commit introduces interceptor based transformers by using the
`:enter` and `:leave` keys returned on the `-value-transformer`
function.

Naively it uses almost identical implementations for all enter and exit
applications, with the only exception being the collection-based
transformers which do look at the phase to avoid double wrapping
collections.

Ultimately there might be some occassions where we could speed things up
even more (eg. not reducing over a collection if there isn't a mapping
function anyway) but those optimizations don't exist in the current
implementation either, so this PR doesn't attempt to resolve any of
that.
rschmukler committed Nov 25, 2019
1 parent c0ba26f commit 7d65517
Showing 3 changed files with 240 additions and 157 deletions.
Loading

0 comments on commit 7d65517

Please sign in to comment.