Wolfram: List. Check Exist
MemberQ-
MemberQ[ expr, pattern ]MemberQ[ expr, pattern, levelspec ]→ limit to Level Spec.
Check existence by Pattern.
default Level Spec is
{1}MemberQ[ {1, 2, 3}, 2 ] (* True *) MemberQ[ {1, {a, b}, 3}, {a, b} ] (* True *) (* using a pattern *) MemberQ[ {1, {a, b}, 3}, {_, _} ] (* True *) MemberQ[ {1, {a, b}, 3}, _Integer ] (* True *) Count-
Count[ expr, pattern ]Count[ expr, pattern, levelspec ]→ limit to Level Spec.
Count by Pattern
default Level Spec is
{1}Count[ {1, 2, 3, 1}, 1 ] (* 2 *) Count[ {1, {a, b}, 3}, {a, b} ] (* 1 *) (* using a pattern *) Count[ {1, {a, b}, 3}, {_, _} ] (* 1 *) Count[ {1, {a, b}, 3}, _Integer ] (* 2 *) (* using a levelspec *) Count[ {1,{2,{3,4}}}, {_, _} ] (* 1 *) Count[ {1,{2,{3,4}}}, {_, _}, {1,Infinity} ] (* 2 *)
Get an Element's Position
Position
Wolfram. List Operations, and Loop, Iteration, Recursion
- Wolfram: List Operations
- Wolfram: List. Create (Table)
- Wolfram: Create Flat List (Range)
- Wolfram: List. Get Parts
- Wolfram: List. Add Element
- Wolfram: List. Delete Element
- Wolfram: List. Change Element
- Wolfram: List. Check Exist
- Wolfram: List. Join, Union, Intersection, Difference
- Wolfram: List. Min, Max
- Wolfram: List. Filter
- Wolfram: List. Sort Reverse Ordering
- Wolfram: Flatten
- Wolfram: Riffle (Add at Every Nth)
- Wolfram: RotateLeft
- Wolfram: Padding
- Wolfram: List. Partition, Reshape, Split, Gather
- Wolfram: Transpose
- Wolfram: List. Same Items Counts, Tally, Group
- Wolfram: List. Combinatorics
- Wolfram: Iteration
- Wolfram: Map Function to List
- Wolfram: Scan (foreach)
- Wolfram: Recursion
- Wolfram: Fold (reduce)
- Wolfram: Loop