You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It assumed that you have to convert something to a Set before being able
to use a set operator on it. This is not true: set operators will take
care of conversion when needed. In the shown example, it was actually
detrimental to first convert to a Set, because the (elem) operator can
short-circuit whenever it finds a match, so it won't have to examine all
values in the conceptual Set.
Also, in the example "so" was used: this is unnecessary, since (elem)
returns a full-blown Bool.
Also, refer to "first" if you would like to use different ways of comparison.
0 commit comments