Improved actions in functions and comprehensions