Pages

Wednesday, August 17, 2016

The Art Of Memory: 6, 7 of 9

/* Abstractions */

Domain = function(name) {this.name = name;};
Domain.prototype = {};

TheArtOf = function(domain) {this.domain = domain;};
TheArtOf.prototype = {toString: function() {return 'The Art of ' + this.domain.name;}};

Memory = function() {this.storage = [];}
Memory.prototype = {}
Memory.prototype.remember = function(information) {this.storage.push(information);}
Memory.prototype.toString = function() {return this.storage.toString();}

Who's on first?