I somehow had it confused with a JavaScript implementation. Not sure how I had that misconception in my head.