Introduction to OOP: Chapter 11: Replacement and Refinement [next] [previous] [audio] [real] [text]

Example from Beta

printAnchor:
	(#
		do
			'< A HREF="http:'->puttext;
			INNER;
			'">'->puttext;
	#);

printOSUAnchor : printAnchor
	(#
		do
			'//www.cs.orst.edu/'->puttext;
			INNER;
	#);

printBuddAnchor : printOSUAnchor
	(#
		do
			'~budd/'->puttext;
			INNER;
	#);
Executing
printBuddAnchor()
results in
 <A HREF="http://www.cs.orst.edu/~budd/"> 

Executing

printBuddAnchor(# do 'oop.htm/'->puttext #)
results in
 <A HREF="http://www.cs.orst.edu/~budd/oop.htm"> 

Intro OOP, Chapter 11, Slide 16a