Explorer

core.compile-collect-strings-range

description
core.compile-collect-strings of the expressions items from lo to hi. Splits the range in half so the recursion depth is O(log n)
type
Fn(items: List<@core.expression>, lo: Number, hi: Number, strings: List<String>) -> List<String>
expression
fn(items$0, lo$1, hi$2, strings$3) =>
  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(_) =>
              $3,
            #some(item$1005) =>
              @core.compile-collect-strings(expr: $1005, strings: $3)
          },
        false =>
          $3
      },
    false =>
      let mid$4 = @core.divide(left: @core.plus(left: $1, right: $2), right: 2);
      @core.compile-collect-strings-range(
        items: $0,
        lo: $4,
        hi: $2,
        strings: @core.compile-collect-strings-range(items: $0, lo: $1, hi: $4, strings: $3)
      )
  }
visibility
public
core.compile-collect-strings-range (project definy, branch main, snapshot CfIAXM725tR74SWd4aoTUz4-JJQfqnllblZbQ2Sv204)
id: FRj6H48wr4OBz-o1Htoc12-58vkCqeWSoSQxpuY1oH8
content hash: HJGvIw11ja1axROsixi-cEa7hPmB8zC2B6YGbElxd10