Create reusable 'function' for roller-shutters

You might put some repeating code into a lambda, see e.g.: