What's the appropriate way to write this in Haskell?
# Ruby code, ignore the thread-unsafety for now.
class Ticker
@@tick = 0
def self.update!
@@tick += 1
end
def self.current
return @@tick
end
end
Ticker.update! # 1
Ticker.update! # 2
Ticker.current # 2
--
Joe Van Dyk
http://fixieconsulting.com