Yaml11.float.of: def of yaml-for-bend@0.1.1.0 Import: import yaml-for-bend@0.1.1.0/yaml11.bend as Yaml11 Lines 173-178 of yaml-for-bend@0.1.1.0/yaml11.bend: https://jend.leeeet.dev/read.txt?path=yaml-for-bend@0.1.1.0/yaml11.bend&start_line=173&end_line=178 import Base import yaml-for-bend@0.1.1.0/re.bend as R import yaml-for-bend@0.1.1.0/num.bend as N import yaml-for-bend@0.1.1.0/core.bend as C def float.of(+s: String) -> Maybe<&2, String>: +body = C.unsigned(s) when(Maybe<&2, String>, C.is_inf(body), u => Some{Bool.pick(String, C.is_neg(s), "-.inf", ".inf")}, u => when(Maybe<&2, String>, C.is_nan(s), u => Some{".nan"}, u => when(Maybe<&2, String>, Bool.and(R.matches(float.pat(), s), has_digit(s)), u => Some{N.dec.exact(no.seps(s))}, u => when(Maybe<&2, String>, R.matches(sexa.float.pat(), s), u => Some{sexa.float(s)}, u => None{})))) Uses (16): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/core.bend&name=is_inf https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/core.bend&name=is_nan https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/core.bend&name=is_neg https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/core.bend&name=unsigned https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/num.bend&name=dec.exact https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/re.bend&name=matches https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/yaml11.bend&name=float.pat https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/yaml11.bend&name=has_digit https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/yaml11.bend&name=no.seps https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/yaml11.bend&name=sexa.float https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/yaml11.bend&name=sexa.float.pat https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/yaml11.bend&name=when