public function applyTransformation(TransformationInterface $transform)
    {
        // array_values for re-indexing
        $this->tokens = array_values(
            array_filter(
                array_map(
                    array($transform, 'transform'),
                    $this->tokens
                ),
                function ($token) {
                    return $token!==null;
                }
            )
        );
    }