Comment by theamk
1 day ago
not that kind of language, it does not even come with integer types or "plus" operator by default.. they do give an example of
define { minutes { dequote choose {minutes} {} = {:} <-[characters] } } { minutes {1:23} }
which does Python's equivalent of
"1:23".split(":", 1)[1]
or for a more direct translation:
def minutes(x):
return x[1:] if x[0] == ':' else minutes(x[1:])
minutes("1:23")
No comments yet
Contribute on Hacker News ↗