Re: Matching on Arguments of Flat Functions ...
- To: mathgroup at smc.vnet.net
- Subject: [mg29589] Re: Matching on Arguments of Flat Functions ...
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Wed, 27 Jun 2001 05:12:24 -0400 (EDT)
- Organization: Universitaet Leipzig
- References: <firstname.lastname@example.org>
- Sender: owner-wri-mathgroup at wolfram.com
Hi, that's a bug. But you may see whats happen with MatchQ[f[1, 2], f[l_, r___] /; (Print[l]; IntegerQ[l])] With the attribute flat the l_ is bound to f because f[f] is f (flat) and your Integer head does not match any more. You should report it to WRI! Regards Jens Detlef Mueller wrote: > > Little Session: > > " > In:= MatchQ[f[1, 2], f[l_Integer, r___]] > Out= True > > In:= SetAttributes[f, Flat] > > In:= MatchQ[f[1, 2], f[l_Integer, r___]] > Out=False > " > > Oops! What happens here? > I heard, that this Attribute may influence > Matching - but I don't see, why something > matched before now doesnt match anymore.