I have the following function:
def timestamp(key: String)
: String
= Monoid.combine(key, Instant.now().getEpochSecond.toString)
and wanted to know if it is clean or not? A pure function for me is provided that the same input always returns the same output. But the above function, always given as one line, returns another line with a different time, which, in my opinion, is not clean.
source
share