def same_head

bend-ml-bpe-tokenizer@0.1.3.0 · main.bend:182

import bend-ml-bpe-tokenizer@0.1.3.0/main.bend as BendMlBpeTokenizer
import Base

182# is the first Cnt of cs the pair (a, b)?
183def same_head(cs: List<&2, Cnt>, +a: Tk, +b: Tk) -> Bool:
184  match cs:
185    case Nil{}:
186      False{}
187    case Con{Cnt{+x, +y, k}, rest}:
188      Bool.and(Tk.eq(x, a), Tk.eq(y, b))

Uses (6)

Used by (2)