Chunky Blues — 22 of 59

Scott Hammack and Jessamin Yu

Release 2

Chapter 4 - Unchunking

Unchunking is an action applying to one thing.

Understand "unchunk [any known thing]" as unchunking.

The unchunking action has an list of objects called unchunked ingredients.

Check unchunking:

if the noun is listed in shattered memories:

say "You've already filed away [the noun]. You shan't be needing its components again.";

stop the action;

else if the noun is not listed in STM and the noun is not listed in LTM:

say "You don't have a chunk by that name.";

stop the action;

else if there is no component list corresponding to a resulting chunk of the noun in the Table of Chunks:

say "[The noun] cannot be broken down any further.";

stop the action.

Carry out unchunking:

let IngredientList be the component list corresponding to a resulting chunk of the noun in the Table of Chunks;

repeat with Count running from 1 to the number of entries in IngredientList:

if entry Count of IngredientList is listed in LTM:

remove entry Count of IngredientList from LTM;

add entry Count of IngredientList to STM, if absent;

else if entry Count of IngredientList is listed in shattered memories:

remove entry Count of IngredientList from shattered memories;

add entry Count of IngredientList to LTM, if absent;

forget the noun;

now unchunked ingredients is IngredientList;

continue the action.

Report unchunking:

say "All right, forget [the noun][if help text is true]. You now have [unchunked ingredients with definite articles][end if]."