A SubListQ function?
- To: mathgroup at smc.vnet.net
- Subject: [mg28546] A SubListQ function?
- From: AGUIRRE ESTIBALEZ Julian <mtpagesj at lg.ehu.es>
- Date: Wed, 25 Apr 2001 19:21:53 -0400 (EDT)
- Organization: Universidad del Pais Vasco/Euskal Herriko Unibertsitatea
- Sender: owner-wri-mathgroup at wolfram.com
Given two lists a and b, how can I find if a is contained in b? I have tried Complement[a, b] == {} Intersection[a, b] == a And@@(MemberQ[#,b]&/@a) They work, but are not very efficient. Is there a better way? Thanks in advance, Julian Aguirre Universidad del Pais Vasco