Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

/PROG/SICP CHALLENGE

Name: Anonymous 2008-09-01 7:21

IMPLEMENT THE COLLECTOR!!!

(((((o) 'a) 'b) 'c)) ; => (a b c)

Name: Anonymous 2008-09-01 9:33

Oh hai

sub o{
    my($o,@list);
    $o=sub{@_ and push @list,@_ and return $o or @list};
}

$,=", ";
print o->('a','b','c')->('x','yy')->();

------------
b:\> perl collect.pl
a, b, c, x, yy
b:\>

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List