< The Science of Programming < SwayPresentations < Objects
Examples
How about aspects?
Here's a stack:
function stack()
{
var store = :null;
function push(item)
{
store = cons(item,store);
item;
}
function pop()
{
var item = car(store);
store = cdr(store);
item;
}
function empty?()
{
store == :null;
}
this;
}
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.