I want to use do to call a function without parameters like so:
do someMethod
from experimenting it seems like I can also write:
total = 42
do total.toString
question, can I do this:
return do next if request.someField == 'ok'
instead of:
return next() if request.someField == 'ok'
The answer is yes.
I see you are asking about convention. The convention, AFAIK, is to use parentheses when there are no parameters:
foo(), and to use do when it’s convenient to wrap a few variables in a closure: