moveTurtleDown({
meters: 0.42,
howFast: 'fast'
}, {
success: function(newCoordinates) { ... },
ranOutOfGas: function() { ... },
fellOffCliff: function(didTurtleSurvive){ ... }
});
(where the
...
s are implementations for callback functions passed in from userland.success
is like the standard return value of a function, while the other two exits can be thought of like two different types of exceptions the machine could throw)