SYNOPSIS

Bool elem( a val, [a] list, Bool(a, a) eq=equal )

ARGUMENTS

val The value to search for ("needle")

list The list to search ("haystack")

eq Optionally, the function used to check for presence (the default is Builtins.equal (3kaya) , obviously, but Builtins.identical (3kaya) might be used)

DESCRIPTION

Check whether the "needle" occurs at least once in the "haystack". This function can be thought of as a specialised version of Array.any (3kaya)

AUTHORS

Kaya standard library by Edwin Brady, Chris Morris and others ([email protected]). For further information see http://kayalang.org/

LICENSE

The Kaya standard library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (version 2.1 or any later version) as published by the Free Software Foundation.

RELATED

Array.any (3kaya)

Builtins.equal (3kaya)

Builtins.identical (3kaya)