are programming language independent. They can be implemented in any programming language Most OOP-specific design patterns may be irrelevant to functional languages Sunday, 7 July 13
Document Text Document def render_title(t) end def render_author(a) end def render_title(t) end def render_author(a) end Template Method Sunday, 7 July 13
@renderer.render(self) end HTMLRenderer TextRenderer def render(doc) puts doc.title puts “By #{doc.author}” end def render(doc) ... end Sunday, 7 July 13