Clock.num: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/clock.bend as Clock Lines 90-93 of cswap-bend-cli@0.1.0.0/clock.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/clock.bend&start_line=90&end_line=93 import Base # The n digits of `s` at offset `off`, as a number. def num(+s: String, off: Nat, +n: Nat) -> Maybe<&2, U32>: +slice = String.take(String.drop(s, off), n) num.pick(all_digits(slice) && Nat.is_eq(String.length(slice), n), slice) Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.drop https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.length https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.take https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/clock.bend&name=all_digits https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/clock.bend&name=num.pick