def decode(index, idxs, end= "\n", sep= ""):
    """-> str

    decodes `idxs : seq int` according to `index : PointedIndex`.

    stops at `end` and joins the results with `sep`.

    """
    end = index(end)
    tgt = []
    for idx in idxs:
        if idx == end: break
        tgt.append(index[idx])
    return sep.join(tgt)