Inspired by mirai, I'm experimenting with using `[]` as an alias for `cdo_execute()` to run the deferred execution in rcdo. This works well when doing just one operation.

Instead of

```
cdo_sub(forecast, obs) |>
cdo_execute()
```

You can do

```
cdo_sub(forecast, obs)[]
```

Which is much shorter.

#RStats

@eliocamp Hmm why not make it return a function and write

cdo_sub(…)()

?

@klmr That would make composition harder, things like

```
cdo_sub(file1, file2) |>
cdo_sqr() |>
cdo_mean() |>
cdo_execute()
```

Would be harder to make work if cdo_ functions returned functions.

@eliocamp Hmm not sure what you mean, `|>` works fine with higher-order functions. Here’s some dummy code which makes your pipeline work:

cdo_sub = function (a, b) {
\() a + b
}

cdo_sqr = function (x) {
\() {
r = x()
r * r
}
}

cdo_mean = function (x) {
\() mean(x())
}

cdo_execute = function (x) {
x()
}

file1 = 1 : 5
file2 = 2 : 6

cdo_sub(file1, file2) |>
cdo_sqr() |>
cdo_mean() |>
cdo_execute()

(In real code you’d force() the args first.)

@klmr cdo_execute() creates a single system call based on all the different operations. It doesn't just execute one free the other it's kind of like dtplyr's collect().