code: function(ctx) {
      assert(this.args.length == 3);
      if (this.args[0].evaluate(ctx).booleanValue()) {
        return this.args[1].evaluate(ctx);
      } else {
        return this.args[2].evaluate(ctx);
      }
    }
docs: ext-if() evaluates and returns its second argument, if the boolean value of its first argument is true, otherwise it evaluates and returns its third argument.