Converts a list into a string, using ToString.toString to convert its elements.
The resulting string resembles list literal syntax, with the elements separated by ", " and
enclosed in square brackets.
The resulting string may not be valid Lean syntax, because there's no such expectation for
ToString instances.
Examples:
[1, 2, 3].toString = "[1, 2, 3]"["cat", "dog"].toString = "[cat, dog]"["cat", "dog", ""].toString = "[cat, dog, ]"
Equations
Instances For
@[implicit_reducible]
Equations
- instToStringList = { toString := List.toString }
@[implicit_reducible]
Equations
- instToStringInt = { toString := Int.repr }