Difference between pure and impure function?

后端 未结 5 1251
再見小時候
再見小時候 2020-12-03 01:34

I assumed that pure functions must always have a return type (i.e., must not be void) and must have the same output regardless of the state of the object and th

5条回答
  •  -上瘾入骨i
    2020-12-03 02:29

    Impure Functions or Mutator Methods change the state of object and modify the values that are stored in Instance Variables.

提交回复
热议问题