Arc Forumnew | comments | leaders | submitlogin
2 points by lojic 6106 days ago | link | parent

"In ruby the lack of a ! at the end of a method isn't a guarantee that a function changes"

Don't you have that backwards? Typically the ! suffix on a method name in Ruby indicates that the method modifies state.

Also, why would (+ counter 1) have to change to (+! counter 1) ? The former doesn't modify state, it simply returns the sum, right?