Explorer

core.call-argument-values-range

description
call-argument-values over the index range [lo, hi). Splits the range in half so that the recursion depth is O(log n).
type
Fn(arguments: List<Record{name: String, value: @core.expression}>, lo: Number, hi: Number) -> List<@core.expression>
expression
fn(arguments$0, lo$1, hi$2) =>
  match @core.less-than-or-equal(left: @core.minus(left: $2, right: $1), right: 1) {
    true =>
      match @core.less-than(left: $1, right: $2) {
        true =>
          match @core.list-get(list: $0, index: $1) {
            #none(_) =>
              [],
            #some(item$1004) =>
              @core.list-concat(left: [$1004.value], right: [])
          },
        false =>
          []
      },
    false =>
      let mid$3 = @core.divide(left: @core.plus(left: $1, right: $2), right: 2);
      @core.list-concat(
        left: @core.call-argument-values-range(arguments: $0, lo: $1, hi: $3),
        right: @core.call-argument-values-range(arguments: $0, lo: $3, hi: $2)
      )
  }
visibility
public
core.call-argument-values-range (project definy, branch compiled-tests, snapshot i6TqClmqVS9FK8rKOvJ43l6Tevx8pvYJ5-zaQqNwemc)
id: WDSHTQLgnwndsWDNMSqFKifUlAR84QgVYfMprhOrsq4
content hash: LGm9FrzsyG-asJ0exNcIJ6fcEa56HE9E6U4PAH4PvFY