note Chmrr <p>I have not read [Dominus]' chapter, so I spent a minute pondering and came up with the following definition of <code>imap</code>, which is probably much less elegant than [Dominus|his]:</p> <code>sub imap(&$) {defined($_=$_[1]->())?($_[0]->($_),&imap(@_)):()}</code> <p>Can you tell I've been writing too much Scheme recently? ;> I also was pondering other implementations of the example iterator discussed earlier, and thought that</p> <code>sub sub_iter { my ($s) = @_; return sub {$s?substr $s, 0, 1, '':undef} }</code> <p>..might be a hair faster than the reverse. <code>Benchmark</code> says it's not, though; oh, well.</p> <p>perl -pe '"I lo*`+$^X$\"$]!$/"=~m%(.*)%s;$_=$1;y^`+*^e v^#$&V"+@( NO CARRIER'</p> 206090 206142