def AaTmB.comma

bend-osdev-apparmor@0.1.0.0 · token.bend:502

import bend-osdev-apparmor@0.1.0.0/token.bend as Token
import Base

502# inside parentheses a comma separates; elsewhere it is out of place
503def AaTmB.comma(b: AaTmB) -> AaTmB:
504  match b:
505    case AaTmB{fs, ok}:
506      match fs:
507        case Nil{}:
508          AaTmB{Nil{}, False{}}
509        case Con{f, rest}:
510          match rest:
511            case Nil{}:
512              AaTmB{Con{f, Nil{}}, False{}}
513            case Con{g, more}:
514              AaTmB{Con{f, Con{g, more}}, ok}

Uses (3)

Used by (1)