Skip to content

Commit

Permalink
feat: interceptor based transformers (#122)
Browse files Browse the repository at this point in the history
See the idea surfaced in #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.
  • Loading branch information
rschmukler authored and ikitommi committed Nov 28, 2019
1 parent c0ba26f commit fdbca89
Show file tree
Hide file tree
Showing 3 changed files with 240 additions and 157 deletions.
Loading

0 comments on commit fdbca89

Please sign in to comment.