// In returns whether v is in the set l.  l may be an array or slice.
347065
func (ns *Namespace) In(l interface{}, v interface{}) (bool, error) {
	if l == nil || v == nil {
		return false, nil
	}

	lv := reflect.ValueOf(l)
	vv := reflect.ValueOf(v)

	if !vv.Type().Comparable() {
		return false, errors.Errorf("value to check must be comparable: %T", v)
	}

	// Normalize numeric types to float64 etc.
	vvk := normalize(vv)

	switch lv.Kind() {
	case reflect.Array, reflect.Slice:
		for i := 0; i < lv.Len(); i++ {
			lvv, isNil := indirectInterface(lv.Index(i))
			if isNil || !lvv.Type().Comparable() {
				continue
			}

			lvvk := normalize(lvv)

			if lvvk == vvk {
				return true, nil
			}
		}
	case reflect.String:
		if vv.Type() == lv.Type() && strings.Contains(lv.String(), vv.String()) {
			return true, nil
		}
	}
	return false, nil
}
503700
func (ns *Namespace) Where(seq, key interface{}, args ...interface{}) (interface{}, error) {
	seqv, isNil := indirect(reflect.ValueOf(seq))
	if isNil {
		return nil, errors.New("can't iterate over a nil value of type " + reflect.ValueOf(seq).Type().String())
	}

	mv, op, err := parseWhereArgs(args...)
	if err != nil {
		return nil, err
	}

	var path []string
	kv := reflect.ValueOf(key)
	if kv.Kind() == reflect.String {
		path = strings.Split(strings.Trim(kv.String(), "."), ".")
	}

	switch seqv.Kind() {
	case reflect.Array, reflect.Slice:
		return ns.checkWhereArray(seqv, kv, mv, path, op)
	case reflect.Map:
		return ns.checkWhereMap(seqv, kv, mv, path, op)
	default:
		return nil, fmt.Errorf("can't iterate over %v", seq)
	}
}
912714
func (tb *LTable) Len() int {
	if tb.array == nil {
		return 0
	}
	var prev LValue = LNil
	for i := len(tb.array) - 1; i >= 0; i-- {
		v := tb.array[i]
		if prev == LNil && v != LNil {
			return i + 1
		}
		prev = v
	}
	return 0
}
709426
func (swaggerTag TagSwagger) In() string {
	text := reflect.StructTag(swaggerTag).Get("swagger")
	texts := strings.Split(text, ",")[1:]

	for _, text := range texts {
		if strings.HasPrefix(text, "in=") {
			return text[3:]
		}
	}

	return ""
}
211771
func (c *Criterion) In(values ...interface{}) *Query {
	c.operator = in
	c.inValues = values

	q := c.query
	q.fieldCriteria[q.currentField] = append(q.fieldCriteria[q.currentField], c)

	return q
}
847080
func (as ArraySpec) Asin() Input {
	return as.proc(func(i Input) Input {
		return i.Asin()
	})
}
735499
func (set WordSet) ContainsAll(i ...string) bool {
	for _, v := range i {
		if !set.Contains(v) {
			return false
		}
	}
	return true
}
1246691
func contains(list interface{}, value string) bool {
	switch l := list.(type) {
	case []interface{}:
		for _, v := range l {
			if v == value {
				return true
			}
		}
	}
	return false
}
617541
func contains(key string, list []string) bool {
	for _, innerKey := range list {
		if key == innerKey {
			return true
		}
	}
	return false
}
14217
func Has(in interface{}, key interface{}) bool {
	av := reflect.ValueOf(in)

	switch av.Kind() {
	case reflect.Map:
		kv := reflect.ValueOf(key)
		return av.MapIndex(kv).IsValid()
	case reflect.Slice, reflect.Array:
		l := av.Len()
		for i := 0; i < l; i++ {
			v := av.Index(i).Interface()
			if reflect.DeepEqual(v, key) {
				return true
			}
		}
	}

	return false
}
651064
func (fs *fsImpl) checkInvariants() {
	// INVARIANT: For each k in inodes, k < nextInodeID
	for k, _ := range fs.inodes {
		if !(k < fs.nextInodeID) {
			panic("Unexpectedly large inode ID")
		}
	}
}
895380
func (session *Session) In(column string, args ...interface{}) *Session {
	session.Statement.In(column, args...)
	return session
}
1142943
func ContainsInt(s []int, v int) bool {
	for _, vv := range s {
		if vv == v {
			return true
		}
	}
	return false
}
1162928
func (b BoolTag) In(err error) bool {
	v, ok := TagValueIn(b.Key, err)
	if !ok {
		return false
	}
	return v.(bool)
}
88251
func In(key string, obj *js.Object) (ok bool, err error) {
	if obj == nil || obj == js.Undefined || TypeOf(obj) != TypeObject {
		return false, errors.New("obj not a JavaScript object")
	}
	return js.Global.Get("$jsbuiltin$").Call("infunc", key, obj).Bool(), nil
}
49538
func (r Range) In(row int) bool {
	return row >= r.Start.Row && row <= r.End.Row
}
98211
func (s *Set) Has(x uint32) bool {
	v := s.sparse[x]
	return v < uint32(len(s.dense)) && s.dense[v] == x
}