Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • Fortran
if (any(x == list)) ...

"x == list" returns an array of booleans. any() is true if any element of the argument array is true.
if (findloc (list, x, 1) != 0) then
with Ada.Containers.Vectors;
Result := List.Contains (X);

New implementation...