def breaks

bolt@1.27.0.0 · src/syntax/outline.bend:476

import bolt@1.27.0.0/src/syntax/outline.bend as Outline
import Base

476# one flag per line break in a text, onto acc (reversed), each str: whether
477# the text is a string's
478def breaks(tt: String, +str: Bool, +acc: List<&2, Bool>) -> List<&2, Bool>:
479  match tt:
480    case SNil{}:
481      acc
482    case SCon{h, t}:
483      breaks(t, str, Bool.pick(List<&2, Bool>, U32.is_eq(Char.to_u32(h), 10), str <> acc, acc)) # '\n'

Uses (6)

Used by (1)