How to add your knowledge

some?()

    Synopsis

    Returns a value of True if the named function fun returns a value of True for any argument supplied in the input list.

    Syntax

    some? ( fun As Name, _
            list As List ) As Boolean 
    Argument Type Description
    fun Name The name of the function to apply. The function must accept a single "Any" parameter, and return a Boolean.
    list list List of arguments, to which the function will be applied.

    Example 1

    Intent >some?(:empty?, {{1}, {:a}, {}, {:b}}) 
    --> True 
    In this example, the third element of the input list is empty, and therefore the empty? function returns True for it.

    Example 2

    Intent >some?(:empty?, {{}, {:a}, {}, {:b}}) 
    --> True 
    In this example, more than one of the list items matches the empty? predicate.

    Example 3

    Intent >some?(:empty?, {{1}, {:a}, {2}, {:b}}) 
    --> False 
    Here, none of the list items matches the empty? predicate.

    Example 4

    Intent >some?(:even?, {1, 2, 3, 4, 5}) 
    --> True 
    Here, 2 of the 4 list items causes a True return for the even? function.

    Example 5

    Intent >some?(:even?, {1, 3, 5, 7, 9}) 
    --> False 
    Here, none of the list items is even, so no matches are found.