Explorer

core.compile-string-data-range

description
The bytes of the strings from lo up to hi, one after another (the first half then the second half)
type
Fn(strings: List<String>, lo: Number, hi: Number) -> List<Number>
expression
fn(strings$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) {
            #some(item$3) =>
              @core.string-to-bytes(value: $3),
            #none(_) =>
              []
          },
        false =>
          []
      },
    false =>
      let mid$4 = @core.divide(left: @core.plus(left: $1, right: $2), right: 2);
      @core.list-concat(
        left: @core.compile-string-data-range(strings: $0, lo: $1, hi: $4),
        right: @core.compile-string-data-range(strings: $0, lo: $4, hi: $2)
      )
  }
visibility
public
core.compile-string-data-range (project definy, branch main, snapshot CfIAXM725tR74SWd4aoTUz4-JJQfqnllblZbQ2Sv204)
id: _kB9uiGwYokAbZKvf0rFQ0pgWJSOe9I38JqZjOqIfLY
content hash: NPqm0fnsgvZHxOddh2LrjNgIQw2z2uSyaTTz6OuVCmA