Skip to content

Commit

Permalink
more idiomatic
Browse files Browse the repository at this point in the history
Co-authored-by: Jeroen Op 't Eynde <[email protected]>
  • Loading branch information
replay and Duologic authored Feb 22, 2024
1 parent fffda06 commit c1d3dbf
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions ascii.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,5 @@ local d = import 'github.com/jsonnet-libs/docsonnet/doc-util/main.libsonnet';
'`isStringNumeric` reports whether string `s` consists only of numeric characters.',
[d.arg('str', d.T.string)]
),
isStringNumeric(str): std.all([
self.isNumber(c)
for c in std.stringChars(str)
]),
isStringNumeric(str): std.all(std.map(self.isNumber, std.stringChars(str)),
}

0 comments on commit c1d3dbf

Please sign in to comment.