#ifndef COUNTER_H
#define COUNTER_H

struct counter {
  int value;
};
typedef struct counter counter_t;

counter_t counter_init(int n); // Initializes a counter at value n
int counter_value(counter_t ctr); // Returns the value of counter ctr
void counter_add(counter_t *ctr, int n); // Adds n to the value of the counter

#endif
