check if value exists in given collection
Parameters
in? value :any
collection :string :dictionary :block :range
Attributes
at | :integer | check at given location within collection |
Returns
Examples
copy
arr: [1 2 3 4]
in? 5 arr
in? 2 arr
copy
user: #[
name: "John"
surname: "Doe"
]
in? "John" dict
in? "Paul" dict
in? "name" keys dict
copy
in? "x" "hello"
in? `h` "hello"
copy
in?.at:1 "el" "hello"
in?.at:4 `o` "hello"
copy
print in?.at:2 "two" ["one" "two" "three"]
print in?.at:1 "two" ["one" "two" "three"]
Related