-
Couldn't load subscription status.
- Fork 153
Open
Description
Existence of a particular value
To find out whether an array has a particular value among its elements, you can use in():
julia> in(2, primes)
true
Somewhat strangely, in the in() syntax, the needle comes before the haystack, i.e. in(value, array), where value denotes the value you are looking for.
Why not talk about contains() as well, where the haystack comes first?
Metadata
Metadata
Assignees
Labels
No labels