Extend eta reduction to work with casted arguments