• frezik@midwest.social
      link
      fedilink
      arrow-up
      1
      ·
      6 months ago

      It’s only a const within a function. You can pass the value to another function and changing it as it’s passed. For example:

      const int foo = 1
      other_func( foo + 1)
      

      In functional programming, you tend to keep track of state on the stack like this.