def String.get

Base · base.bend:2151

import Base
2151def String.get(s: String, n: Nat) -> Maybe<&2, Char>:
2152  match s n:
2153    case SNil{} _:
2154      None{}
2155    case SCon{h, t} 0n:
2156      Some{h}
2157    case SCon{h, t} 1n+p:
2158      String.get(t, p)

Uses (4)

Used by (9)