Toggle function

Hi!
I added a toggle function which I thought will be useful.
The function has a default parameter (true) and the first is passed by reference.
I thought it will be useful to change the toggle a boolean variable when a button is pressed.

Exemple:
bool state = false;
int button = 5;

void setup(){
pinMode(button, INPUT);
}

void loop(){
toggle(state, digitalRead(button)); // start/stop button
   if(state){
      //action ...
   }
}

Thank you!