Explorer

core.bytes-less-than

description
Whether the byte list left comes before right in lexicographic order (from index)
type
Fn(left: List<Number>, right: List<Number>, index: Number) -> Boolean
expression
fn(left$0, right$1, index$2) =>
  match @core.list-get(list: $0, index: $2) {
    #none(_) =>
      match @core.list-get(list: $1, index: $2) {
        #none(_) =>
          false,
        #some(_) =>
          true
      },
    #some(l$10) =>
      match @core.list-get(list: $1, index: $2) {
        #none(_) =>
          false,
        #some(r$11) =>
          match @core.less-than(left: $10, right: $11) {
            true =>
              true,
            false =>
              match @core.equal(left: $10, right: $11) {
                true =>
                  @core.bytes-less-than(left: $0, right: $1, index: @core.plus(left: $2, right: 1)),
                false =>
                  false
              }
          }
      }
  }
visibility
public
core.bytes-less-than (project definy, branch compiled-tests, snapshot i6TqClmqVS9FK8rKOvJ43l6Tevx8pvYJ5-zaQqNwemc)
id: G2BvBEXLYEAqvx5WOhFYgeIYd18vXNyQvpIu1vejsYI
content hash: 3KxvQ7fYVV-RDt6TbjOXYxOsRDJsshI3InKqJTkhwzg