So I realised that I was pass in (s, current) into virtually every function and it made me realise there was probably a hidden abstraction missing. Initially, I thought that was scanner which basically had all the methods that were standalone functions but then I realised I was missing the concept of iterators which I added.
I also removed the isMapping, isString and isSequence functions since they were just clutter.
So I realised that I was pass in (s, current) into virtually every function and it made me realise there was probably a hidden abstraction missing. Initially, I thought that was scanner which basically had all the methods that were standalone functions but then I realised I was missing the concept of iterators which I added. I also removed the isMapping, isString and isSequence functions since they were just clutter.