RosettaCodeData/Task/Conditional-structures/Luna/conditional-structures-2.luna
2023-07-01 13:44:08 -04:00

5 lines
121 B
Text

class JSON:
...
def asText: case self of:
JSONString t: t
other: throw "JSON.asText: not a text"