The first problem is that your data structure is not conducive to maps at the moment. For simplicity's sake, I got rid of the function in the middle just to test your assignment.
item [int, stat, int, int] FoodItem;
FoodItem [6, $stat[muscle], 21, 29] = $item[spaghetti with skullheads]...