in reply to Re^5: How could we "implement" Open Classes in Perl ?
in thread How could we "implement" Open Classes in Perl ?
And so forth. This means that I can have simplified code later on down the line.for ( var i in x ) { for ( var j in x[i] ) { if ( i > 0 ) buildLeft( x[i][j], x[i][j-1] ) else buildLeft( x[i][j], null ); } } function buildLeft ( obj, target ) { obj['getLeft'] = function () { re +turn target; }; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: How could we "implement" Open Classes in Perl ?
by BrowserUk (Patriarch) on Jun 27, 2008 at 15:44 UTC | |
by dragonchild (Archbishop) on Jun 27, 2008 at 20:58 UTC | |
by BrowserUk (Patriarch) on Jun 27, 2008 at 21:18 UTC | |
by dragonchild (Archbishop) on Jun 28, 2008 at 02:47 UTC | |
by BrowserUk (Patriarch) on Jun 29, 2008 at 23:03 UTC |