Sets the initial result and execution value for all operations.

import Batch = require("nativescript-batch");

var b = Batch.newBatch(function(ctx) {
    console.log("Result: " + ctx.result);  // 23979
    console.log("Value: " + ctx.value);  // 23979
}).then(function(ctx) {
    ctx.setResultAndValue(5979);
}).then(function(ctx) {
    console.log("Result: " + ctx.result);  // 5979
    console.log("Value: " + ctx.value);  // 5979
}).setResultAndValue(23979);

// 5979
var r = b.start();