def heads.drop

emerging-eztoml@0.9.0.0 · main.bend:2007

import emerging-eztoml@0.9.0.0/main.bend as EmergingEztoml
import Base

2007# forget every table whose path starts with the prefix. A new element of an
2008# array of tables starts with none of the tables the element before defined
2009def heads.drop(hs: List<&2, String>, +pre: String) -> List<&2, String>:
2010  match hs:
2011    case []:
2012      []
2013    case SCon{mark, +path} <> t:
2014      heads.drop.step(String.starts_with(path, pre), mark, path, heads.drop(t, pre))
2015    case SNil{} <> t:
2016      heads.drop(t, pre)

Uses (4)

Used by (1)