USING: accessors kernel math math.constants math.functions prettyprint ; IN: shapes TUPLE: circle radius ; TUPLE: rectangle width height ; GENERIC: area ( shape -- area ) M: circle area radius>> sq pi * ; M: rectangle area [ width>> ] [ height>> ] bi * ; rectangle new 10 >>width 20 >>height area .