def unend.go

ezx@1.11.0.0 · src/ledger/ignore.bend:349

import ezx@1.11.0.0/src/ledger/ignore.bend as Ignore
import Base

349# the last piece of a file cut at its newlines, dropped when it is empty: it
350# is what follows the newline the file ends with, and not a line a person
351# wrote
352def unend.go(rest: List<&2, String>, +last: String) -> List<&2, String>:
353  match rest:
354    case []:
355      Bool.pick(List<&2, String>, String.is_empty(last), [], [last])
356    case +h2 <> t2:
357      last <> unend.go(t2, h2)

Uses (4)

Used by (1)