Arc Forumnew | comments | leaders | submitlogin
1 point by bOR_ 6164 days ago | link | parent

Ugh, as lojic pointed out (thanks for that :)), some sleep-deprived errors in this post. The more correct version:

  In ruby, the lack of a ! at the end of a method isn't a guarantee that a function doesn't modiefy state.
And you're right about (+ counter 1). Blindly remembered the example I got in the ruby forum when I was surprised that some method modified state without a warning !.

The correct example in arc would be this:

  (++ counter 1)
would have to become

  (++! counter 1)