Re: Homogeneous sequence
- Posted by Pete Lomax <petelomax at blu?yo?der.co.uk> Aug 12, 2007
- 664 views
Juergen Luethje wrote: > > If all elements of 'list' are sequences, then their lengths must be the > same, otherwise Eu sequence ops won't work. Ding! I see now. My gut says there is a *faster* way, danged if I can articulate it proper though. The core idea would be Tmatch(template,object) rather than build a template for every object. But then again you said you care not about performance. To answer the questions actually posed: An empty sequence should imo be considered homogenous. So too should an atom, in this context, which you have excluded. You may also (one day) be looking at sq_op(a,b) and likewise wanting to prove that both a and b have matching structures, not particularly hard just something to factor in at the get-go. Regards, Pete