Weird Code-Chain Thread Idea...?

I just had a weird idea…

Some other threads on here like the Word Association Game, or the Three Word Story (among others), are essentially chains that each person helps to extend. I wonder if this could somehow be done with code, as a few ideas:

A. Someone starts off a chunk of code, and then each person adds a line, or a few lines to it…
OR
B. Someone writes a simple class, & then the next person has to either extend it or instantiate it in a unique way…
OR
C. Something.

In the first scenario (A), the code might not be executable until a certain point is reached (ie closing out a function).
In scenario B, it should be executable with each new post.

In all scenarios the code would need to be valid and potentially executable. In scenario A it wouldn’t necessarily be executable with each post, but the code added would need to be able to be built upon, as a general example - if someone starts to build a circle, but leaves it to the next person to decide it’s size, the successive person can not put in coordinates for a Rectangle (ie drawCircle(0,0,50,50); would be invalid code).

Not sure if this idea would even work, but it would probably be best to consider AS3 as it has more code-friendly features & more robust dynamic drawing options - obviously there would be no Library items - everything would be created dynamically.

It seems like a fun idea, but I’m not sure how practical it is…?