How to check that an array contains a particular value in Scala 2.8? -


i've got array of d unique (int, int) tuples.

i need know if array contains (x, y) value.

am implement search algorithm myself or there standard function in scala 2.8? i've looked @ documentation couldn't find of such there.

that seems easy (unless i'm missing something):

scala> val = array((1,2),(3,4)) a: array[(int, int)] = array((1,2), (3,4))  scala> contains (1,2) res0: boolean = true  scala> contains (5,6) res1: boolean = false 

i think api calls you're looking in arraylike.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -