```
var scroll = (function(direction) {
  return function() { ... };
}(target - position < 0 ? -1 : 1));
```
now the direction is bound to the function's closure too, rather than being manipulable from the outside.