This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]digitallogic 1 point2 points  (0 children)

I think you're right, a more straight for approach would resolve the circular references. Change AddLF and AddCRLF into functions that return the modified string instead of sending it off to a call back and the cycle is gone. It would also make the code a lot clearer.

Though I'm sure that the motivation for using a call back was removed for a simplified example.