A DSL for compiling chained transformations