core.quote-part-ids-from
- description
- found with the ids of frontier and of the parts they reference (following the references through index, a core.list-hash-index of the parts by id). Each step adds the new ids of frontier and makes the next frontier from the references of their parts; it calls itself in the tail position. An id without a part in index is added but not followed
- type
Fn( frontier: List<String>, found: List<String>, index: List<List<Record{id: String, expression: @core.expression}>> ) -> List<String>- expression
fn(frontier$0, found$1, index$2) => let step$3 = @core.list-fold( T: String, A: Record{found: List<String>, next: List<String>}, reducer: fn(acc$4, item$5) => match @core.list-contains-string(list: $4.found, target: $5, index: 0) { true => $4, false => { found: @core.list-append(list: $4.found, item: $5), next: match @core.list-hash-index-find(index: $2, field: "id", value: $5) { #some(part$6) => @core.expression-part-references(expr: $6.expression, ids: $4.next), #none(_) => $4.next } } }, init: {found: $1, next: []}, xs: $0 ); match @core.equal(left: @core.list-length(value: $3.next), right: 0) { true => $3.found, false => @core.quote-part-ids-from(frontier: $3.next, found: $3.found, index: $2) }
- visibility
- public
core.quote-part-ids-from (project definy, branch quote-encoded-parts, snapshot LbKb9vIRs5vdtsu6TiOqZ_NMUZJ6k1s6WlbZOc6x3-I) id: vGCZHY6q2Mjao3zeWGV6AShMjEAd_DumezsJGhD-bKs content hash: pAu7vExj0cqzRU6hlW9pwo09C6h3wnjgHqkEyv12V-4