def lead
import ezx@1.11.0.0/src/ledger/ignore.bend as Ignoreimport Base
50# one leading `/`, which anchors a pattern to the file's own directory and
51# so changes nothing for a `.gitignore` at the root
52def lead(+pat: String) -> String:
53 Bool.pick(String, String.starts_with(pat, "/"), String.drop(pat, 1n), pat)