In Erels helpful videos there is in above mentioned video at 7:14 there is a point I do not understand:
sub Pop returns the last item of a list.
As I understand, what happens is:
line 15: res is filled with a pointer to the last listitem
line 16: this item is removed from the list
line 17: now res is expected to point to nothing, but it does not.
Why does this code work?
sub Pop returns the last item of a list.
As I understand, what happens is:
line 15: res is filled with a pointer to the last listitem
line 16: this item is removed from the list
line 17: now res is expected to point to nothing, but it does not.
Why does this code work?