Is there an in operator in Hylang? In python, for example, this would allow for the following test:
lst = [1, 2, 3, 4]
print(0 in lst)
# => False
Is there an in operator in Hylang? In python, for example, this would allow for the following test:
lst = [1, 2, 3, 4]
print(0 in lst)
# => False
Hylang seems to not have an operator that would check a list for occurences.
But there is a solution. You can use the py operator to check for list occurences via native python code.
It would look like that:
(py "0 in lst")
(This would be better as a comment but my reputation doesn't suffice.)
The Hylang documentation includes a mention about the keyword in.