I have to say I still haven’t really figured out how TeX works, despite using latex for years. I can’t even do a for loop or simple arithmetic or find the size of an array, let alone implement complete algorithms. Is there anyway I can learn this?
This was the reference I used for TeX programming: https://pgfplots.sourceforge.net/TeX-programming-notes.pdf