That way it would provide more “typesafety” and also it would hinder users to throw in a “normal” list and use it as stack.
Also we could insert some Meta-Data to do some optimisations on other functions (eg. store the size in the tuple to make size/1 run in O(1) instead of O(n))
I can do this myself is you are okay with it @sashaafm
That way it would provide more “typesafety” and also it would hinder users to throw in a “normal” list and use it as stack.
Also we could insert some Meta-Data to do some optimisations on other functions (eg. store the size in the tuple to make
size/1
run in O(1) instead of O(n))I can do this myself is you are okay with it @sashaafm