Added arrayFind

This commit is contained in:
Dmitry Boulytchev 2021-08-31 01:47:49 +03:00
parent 9e5c562d60
commit 11203f3a85
4 changed files with 16 additions and 1 deletions

View file

@ -181,6 +181,10 @@ Array processing functions:
\descr{\lstinline|fun iteriArray (f, a)|}{Applies a function "\lstinline|f|" to each element of an array "\lstinline|a|" and its index (index first);
does not return a value.}
\descr{\lstinline|fun findArray (f, a)|}{Finds a value in an array "\lstinline|a|" which satisfies the predicate "\lstinline|f|". The
predicate must return integer value, treated as boolean. Returns "\lstinline|None|" if no element satisfies "\lstinline|f|" and
"\lstinline|Some (v)|" otherwise, where "\lstinline|v|"~--- the first value to satisfy "\lstinline|f|".}
\section{Unit \texttt{Collection}}
\label{sec:collection}