Alice Manual – The VectorPair structure

The VectorPair structure provides operations on pairs of vectors, very much like the ListPair structure does for pairs of lists. These operations do not require that the vectors have the same length, when they are of uneven lengths, the excess elements from the longer vector are ignored. Combines the two vectors vec1 and vec2 into a vector of pairs, with the first element of each vector comprising the first element of the result, the second elements comprising the second element of the result, and so on. If the vectors are of unequal lengths, the excess elements from the longer one are ignored. Returns a pair of vectors formed by splitting the elements of vec. This is the inverse of zip for equal length vectors. Maps the function f over the vector of pairs of elements from from the vectors vec1 and vec2, returning the vector of results. If the vectors are of unequal lengths, the excess elements from the longer one are ignored. The following equivalence holds: Applies the function f to the vector of pairs of elements from from the vectors vec1 and vec2 in left to right order (right to left, respectively). If the vectors are of unequal lengths, the excess elements from the longer one are ignored. The following equivalences hold: Return the result of folding the function f over the pair of vectors vec1 and vec2. The following equivalences hold: These functions provide short-circuit testing of a predicate f over a pair of vectors. The following respective equivalences hold: Applies f to each pair (x1,x2) of elements of the vectors, from left to right, until f(x1,x2) evaluates to true, returns SOME(x1,x2) if such a pair exists and NONE otherwise. If the vectors are of unequal lengths, the excess elements of the longer one are ignored. The above expression is equivalent to: Indexed versions of the functions app, appr, map, foldl, foldr, all, exists and findi. The index of each element is passed to f as an additional argument. For appri and foldri, processing starts at the highest index. In the case of success, findi returns the index of the pair of elements found along with the respective elements. The following equivalences hold: Source.


Яндекс.Метрика Рейтинг@Mail.ru Free Web Counter
page counter
Last Modified:
Fatal error: Call to undefined function mdv_last_modified() in /home1/wacedu0abjm6/public_html/wp-content/themes/CherryFramework/footer.php on line 121