Re: Re: problem with Pick
- To: mathgroup at smc.vnet.net
- Subject: [mg78484] Re: [mg78409] Re: problem with Pick
- From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
- Date: Tue, 3 Jul 2007 05:20:23 -0400 (EDT)
- References: <acbec1a40706230431p4f1db9a9i4320680dda027396@mail.gmail.com> <200707010731.DAA01680@smc.vnet.net> <86E8AE9E-5C16-4DE7-A78D-F7766C0D8E02@mimuw.edu.pl> <21764490.1183381902174.JavaMail.root@m35> <op.tuus22zfqu6oor@monster.ma.dl.cox.net> <23903468.1183413753892.JavaMail.root@m35> <op.tuuz64tbqu6oor@monster.ma.dl.cox.net>
It seems to me that the whole discussion of parts, empty sets etc. is really beside the point, although I admit that the vagueness of the documentation on this point can give rise to this representation. For example both Pick[{{{a}}, {b}, c}, l, _] {{{a}}, {b}, c} and Pick[{{{a}}, {b}, c}, True] { {{a}} , {b}, c} aare perfectly understandable if you think in terms of pattern matching but require (quite unnecesasary) mental acrobatics to explain in terms of the properties of the empty set, NOTHING, EVERYTHING or barbers. The problem is that pattern matching is not easy to explain in one or two lines of documentation. Andrzej Kozlowski On 3 Jul 2007, at 07:46, DrMajorBob wrote: > If I were collecting indices on some criterion and didn't get any, > I'd want the result to be some logical equivalent of NOTHING, not > EVERYTHING. > > expr[[]] = Head[expr][], for instance. > > But Mathematica doesn't do it that way so, as I've said before, > we'll just have to adjust our expectations. > > Bobby > > On Mon, 02 Jul 2007 16:58:11 -0500, Chris Chiasson > <chris at chiasson.name> wrote: > >> On 7/2/07, DrMajorBob <drmajorbob at bigfoot.com> wrote: >> <snip/> >>> Nor have I seen an example in which [[]] is useful, rather than >>> needlessly >>> puzzling. >>> >>> (Unless I blinked and missed it.) >> >> It could be useful if one is generating the arguments to Part via a >> program. If there are no sub-parts needed, then Sequence[] should be >> sent as the second argument. >> > > > > -- > DrMajorBob at bigfoot.com
- References:
- Re: problem with Pick
- From: Chris Chiasson <chris.chiasson@gmail.com>
- Re: problem with Pick