def dp_rows

bend-edit-distance@0.2.2.0 · src/Reconstruction.bend:68

import bend-edit-distance@0.2.2.0/src/Reconstruction.bend as Reconstruction
import Base
import bend-edit-distance@0.2.2.0/EdlibTypes.bend as E

68def dp_rows(query: String, +target: String, previous: List<&2, TraceCell>,
69            +index: U32, +pairs: List<&2, E.EqualityPair>,
70            directions: List<&2, List<&2, TraceCell>>) -> List<&2, List<&2, TraceCell>>:
71  match query:
72    case SNil{}:
73      directions
74    case SCon{h, t}:
75      +row = dp_row(previous, target, h, index, pairs)
76      dp_rows(t, target, row, U32.add(index, 1), pairs,
77        List.reverse(&2, TraceCell, row) <> directions)

Uses (8)

Used by (1)