def take
import bend-lint-api@0.2.0.0/shared/strings.bend as Stringsimport Base
10# The first `n` characters of `s`. Base's String.take is not tail-recursive, so long text would overflow the stack.
11def take(s: String, n: Nat) -> String:
12 take.go(n, s, "")