clear
clc

buildCDs

% Traversal
disp('all CDs');
printCDs(collection, 'artist', 's');

% Filter
noRay = filterCDs( collection, 'artist', 'Charles, Ray' );
disp('CDs with no Ray Charles')
printCDs(noRay,'artist', 's');

% Map
addedCDs = addValue(collection);
disp('CD values');
printCDs(addedCDs, 'value', 'g');

% Fold
theCD = bestValue(addedCDs)

% Search

joshCD = findCD(addedCDs, 'artist', 'Groban, Josh')
cheapCD = findCD(addedCDs, 'price', 13.29)
cheapCDs = filterCDs(collection, 'price', 13.29)

writeCDs(addedCDs, 'addedCDs.txt');





