Simple syntax for a list with "or"?

Narrator’s voice: Two years earlier… :grin:

Lab is a room.

To say or-list (l - list of values):
  now or-not-and is true;
  say l;
  now or-not-and is false.

or-not-and is initially false.

L is initially {1 , 2, 3};

For issuing the response text of the list writer internal rule response (C) when or-not-and is true: say " or ".

when play begins:
  say "[or-list L]".

Edited: Actually, this is less ugly:

list-conjunction is initially "and".

To say (l - list of values) with conjunction (t - text):
  let backup be list-conjunction;
  now list-conjunction is t;
  say l;
  now list-conjunction is backup.

To say or-list (l - list of values):
  say l with conjunction "or";

For issuing the response text of the list writer internal rule response (C): say " [list-conjunction] ".
5 Likes