fn(bytes$0, offset$1, count$2) =>
match @core.less-than(left: $2, right: 2) {
true =>
match @core.equal(left: $2, right: 1) {
true =>
match @cbor.read(bytes: $0, offset: $1) {
#some(key$3) =>
match @cbor.read(bytes: $0, offset: $3.next) {
#some(value$4) =>
#some({entries: [{key: $3.value, value: $4.value}], next: $4.next}),
#none(_) =>
#none
},
#none(_) =>
#none
},
false =>
#some({entries: [], next: $1})
},
false =>
let half$5 = @core.divide(left: $2, right: 2);
match @cbor.read-entries(bytes: $0, offset: $1, count: $5) {
#some(left$6) =>
match @cbor.read-entries(bytes: $0, offset: $6.next, count: @core.minus(left: $2, right: $5)) {
#some(right$7) =>
#some({entries: @core.list-concat(left: $6.entries, right: $7.entries), next: $7.next}),
#none(_) =>
#none
},
#none(_) =>
#none
}
}