Re: RFC 132 (v1) subroutines should be able to return an lvalue
[email protected] (Damian Conway) Sat, 19 Aug 2000 05:45:39 +1000 (EST)
| Newsgroups | perl.perl6.language.subs |
|---|---|
| Message-ID | <[email protected]> |
> How about recursive calls to want(), similar to multiple $$$'s? > > if (want(want(want))) eq 'HASH' ) No, that's heading in the wrong direction (both figuratively and literally :-) C<want> with no arguments returns a list of valid contexts. C<want> with arguments expects a list of contexts and returns true if they're valid. So: want(want) is always true (in fact that's a good conformance test for C<want>). Thus: want(want(want)) is: want($some_positive_integer) which is (almost certainly) false, so: want(want(want(want))) is (almost certainly) false too, etc., etc. Damian