Mojo function
repr
repr[T: Representable](value: T) -> String
Returns the string representation of the given value.
Parameters:
- T (
Representable): The type ofvalue. Must implement theRepresentabletrait.
Args:
- value (
T): The value to get the string representation of.
Returns:
String: The string representation of the given value.
repr[U: Copyable & Writable](value: LinkedList[U]) -> String
Returns the string representation of an LinkedList[U].
Parameters:
Args:
- value (
LinkedList): ALinkedListof element typeU.
Returns:
String: The string representation of LinkedList[U].
repr(value: None) -> String
Returns the string representation of None.
Args:
- value (
None): ANonevalue.
Returns:
String: The string representation of None.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!