3 ms·
To get an API I just define a type for double-ended-stacks functions manipulating it. Or if you prefer to define it with immutable variables the functions accep
by menotyou 4y ago
To get an API I just define a type for double-ended-stacks functions manipulating it. Or if you prefer to define it with immutable variables the functions accept an double-ended-stack and return a new copied and modified stack as result.
The set of functions will be a moduls resembling what you call an API.
I am not argue this can not be done on OOP, but I find it counter-intuitive and overly complex to do so.