\hypertarget{group__list__functions}{}\section{List Functions}
\label{group__list__functions}\index{List Functions@{List Functions}}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
bool \mbox{\hyperlink{group__list__functions_ga776993c1408e78f466e9b11aff7ecc46}{Qore\+::inlist}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{group__list__functions_ga67118489d63343ab95f887d785157c51}{Qore\+::inlist}} (any arg, nothing x)
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{group__list__functions_ga27907f4f9f10c03851559e6e9991b14e}{Qore\+::inlist}} (auto arg, softlist l)
\begin{DoxyCompactList}\small\item\em Returns \mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}} if the first argument is a member of the second argument list using soft comparisons (with implicit type conversions), \mbox{\hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False}} if not. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{group__list__functions_ga1fdf41e61754093da9f8a3b40e2a9cea}{Qore\+::inlist\+\_\+hard}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{group__list__functions_ga4668ef52b2c07e8768118bc7c8638414}{Qore\+::inlist\+\_\+hard}} (any arg, nothing x)
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{group__list__functions_ga97794840ca563f15317706b036b07efa}{Qore\+::inlist\+\_\+hard}} (auto arg, softlist l)
\begin{DoxyCompactList}\small\item\em Returns \mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}} if the first argument is a member of the second argument list using hard comparisons (without any implicit type conversions), \mbox{\hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False}} if not. \end{DoxyCompactList}\item 
auto \mbox{\hyperlink{group__list__functions_ga765d602af09d495774ed996a4991d638}{Qore\+::max}} (\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} l)
\begin{DoxyCompactList}\small\item\em Returns the maximum value in a list. \end{DoxyCompactList}\item 
auto \mbox{\hyperlink{group__list__functions_gaf8c5fe3ac64fac2eab1f17d0b032d368}{Qore\+::max}} (\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} l, \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} func)
\begin{DoxyCompactList}\small\item\em Returns the maximum value in a list; accepts the name of a function to use to compare complex data types or to give a special sort order. \end{DoxyCompactList}\item 
auto \mbox{\hyperlink{group__list__functions_gaeb8d7938f787f3b72767aa1286c12f4d}{Qore\+::max}} (\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} l, code f)
\begin{DoxyCompactList}\small\item\em Returns the maximum value in a list; accepts a \mbox{\hyperlink{expressions_call_reference}{call reference}} or a \mbox{\hyperlink{expressions_closure}{closure}} to use to compare complex data types or to give a special sort order. \end{DoxyCompactList}\item 
auto \mbox{\hyperlink{group__list__functions_ga748c43cafa3ab5aef9e24d983e89f047}{Qore\+::max}} (...)
\begin{DoxyCompactList}\small\item\em Returns the maximum value of the arguments passed to the function. \end{DoxyCompactList}\item 
auto \mbox{\hyperlink{group__list__functions_ga0a12d0a98055d7f4804adae35a1d149b}{Qore\+::min}} (\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} l)
\begin{DoxyCompactList}\small\item\em Returns the minumum value in a list. \end{DoxyCompactList}\item 
auto \mbox{\hyperlink{group__list__functions_gae73e31eaecf7e92eb42c6ec0526225ad}{Qore\+::min}} (\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} l, \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} func)
\begin{DoxyCompactList}\small\item\em Returns the minumum value in a list; accepts the name of a function to use to compare complex data types or to give a special sort order. \end{DoxyCompactList}\item 
auto \mbox{\hyperlink{group__list__functions_ga433b73fc23f12156420b977ac62f6e00}{Qore\+::min}} (\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} l, code f)
\begin{DoxyCompactList}\small\item\em Returns the minumum value in a list; accepts a \mbox{\hyperlink{expressions_call_reference}{call reference}} or a \mbox{\hyperlink{expressions_closure}{closure}} to use to compare complex data types or to give a special sort order. \end{DoxyCompactList}\item 
auto \mbox{\hyperlink{group__list__functions_gadd91030761ee2fa0b1783f76b2ea467c}{Qore\+::min}} (...)
\begin{DoxyCompactList}\small\item\em Returns the minumum value of the arguments passed to the function. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} \mbox{\hyperlink{group__list__functions_gabf1a283eed97fa22a32be14b30add9e6}{Qore\+::range}} (\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} start, \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} stop, \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} step=1)
\begin{DoxyCompactList}\small\item\em Returns a list containing an arithmetic progression of integers. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} \mbox{\hyperlink{group__list__functions_ga5323b7e10aa589da12e6790f15711fb0}{Qore\+::range}} (\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} stop)
\begin{DoxyCompactList}\small\item\em Returns a list containing an arithmetic progression of integers with start = 0 and step = 1. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__list__functions_ga8d6317ddd1278a3a8ee255ec160333c3}{Qore\+::reverse}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} \mbox{\hyperlink{group__list__functions_ga690f86a8283a28ab077a542a0d60b8c3}{Qore\+::reverse}} (\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} l)
\begin{DoxyCompactList}\small\item\em Reverses a list and returns the new list. \end{DoxyCompactList}\item 
auto \mbox{\hyperlink{group__list__functions_gaff8cac5bd5ffb29fb750e273e4e8fe92}{Qore\+::sort}} (auto arg)
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} \mbox{\hyperlink{group__list__functions_ga92f1bef2e1d3e7553899161035ebce7f}{Qore\+::sort}} (\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} l)
\begin{DoxyCompactList}\small\item\em Performs an unstable sort in ascending order and returns the new list. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} \mbox{\hyperlink{group__list__functions_ga685a5306bdc7d39d7d0f22f4a39f9cc0}{Qore\+::sort}} (\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} l, \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} func)
\begin{DoxyCompactList}\small\item\em Performs an unstable sort in ascending order and returns the new list; accepts the name of a function to use to sort complex data types or to give a special sort order. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} \mbox{\hyperlink{group__list__functions_gacbf1017e94fb40ebba2911cb0c0013c1}{Qore\+::sort}} (\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} l, code f)
\begin{DoxyCompactList}\small\item\em Performs an unstable sort in ascending order and returns the new list; accepts a \mbox{\hyperlink{expressions_call_reference}{call reference}} or a \mbox{\hyperlink{expressions_closure}{closure}} to use to sort complex data types or to give a special sort order. \end{DoxyCompactList}\item 
auto \mbox{\hyperlink{group__list__functions_gad9e205ca0a43f52a1388611b54521c19}{Qore\+::sort\+Descending}} (auto arg)
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} \mbox{\hyperlink{group__list__functions_ga357f2c1db2247e470ab9a4e2d143dc7a}{Qore\+::sort\+Descending}} (\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} l)
\begin{DoxyCompactList}\small\item\em Performs an unstable sort in descending order and returns the new list. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} \mbox{\hyperlink{group__list__functions_ga8b3017c54bb55091ffc345e29eba5066}{Qore\+::sort\+Descending}} (\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} l, \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} func)
\begin{DoxyCompactList}\small\item\em Performs an unstable sort in descending order and returns the new list; accepts the name of a function to use to sort complex data types or to give a special sort order. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} \mbox{\hyperlink{group__list__functions_ga5a2df667b83aa3ec79c8154e7f4ba151}{Qore\+::sort\+Descending}} (\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} l, code f)
\begin{DoxyCompactList}\small\item\em Performs an unstable sort in descending order and returns the new list; accepts a \mbox{\hyperlink{expressions_call_reference}{call reference}} or a \mbox{\hyperlink{expressions_closure}{closure}} to use to sort complex data types or to give a special sort order. \end{DoxyCompactList}\item 
auto \mbox{\hyperlink{group__list__functions_gacd07eea87f385a0bb8764a9fa5b47075}{Qore\+::sort\+Descending\+Stable}} (auto arg)
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} \mbox{\hyperlink{group__list__functions_ga99855545ae07a5c89b2aa7daa20c240e}{Qore\+::sort\+Descending\+Stable}} (\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} l)
\begin{DoxyCompactList}\small\item\em Performs a stable sort in descending order and returns the new list. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} \mbox{\hyperlink{group__list__functions_ga50acfbff38f01a80c572caae9954511c}{Qore\+::sort\+Descending\+Stable}} (\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} l, \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} func)
\begin{DoxyCompactList}\small\item\em Performs a stable sort in descending order and returns the new list; accepts the name of a function to use to sort complex data types or to give a special sort order. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} \mbox{\hyperlink{group__list__functions_ga94b9f84a8380f641e8268af5bea407c8}{Qore\+::sort\+Descending\+Stable}} (\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} l, code f)
\begin{DoxyCompactList}\small\item\em Performs a stable sort in descending order and returns the new list; accepts a \mbox{\hyperlink{expressions_call_reference}{call reference}} or a \mbox{\hyperlink{expressions_closure}{closure}} to use to sort complex data types or to give a special sort order. \end{DoxyCompactList}\item 
auto \mbox{\hyperlink{group__list__functions_ga6202469e6119631474b685952cefe11f}{Qore\+::sort\+Stable}} (auto arg)
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} \mbox{\hyperlink{group__list__functions_ga15501b975140857b6db1060fcc14f099}{Qore\+::sort\+Stable}} (\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} l)
\begin{DoxyCompactList}\small\item\em Performs a stable sort in ascending order and returns the new list. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} \mbox{\hyperlink{group__list__functions_gaa57833641818b74e7f3ce0b78b0aa935}{Qore\+::sort\+Stable}} (\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} l, \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} func)
\begin{DoxyCompactList}\small\item\em Performs a stable sort in ascending order and returns the new list; accepts the name of a function to use to sort complex data types or to give a special sort order. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} \mbox{\hyperlink{group__list__functions_gabf5874986356a836b4f330b2e9c34fa4}{Qore\+::sort\+Stable}} (\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} l, code f)
\begin{DoxyCompactList}\small\item\em Performs a stable sort in ascending order and returns the new list; accepts a \mbox{\hyperlink{expressions_call_reference}{call reference}} or a \mbox{\hyperlink{expressions_closure}{closure}} to use to sort complex data types or to give a special sort order. \end{DoxyCompactList}\item 
auto \mbox{\hyperlink{group__list__functions_ga0149391f4fb2c97dd4ad2080f9240753}{Qore\+::sort\+\_\+descending}} (auto arg)
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} \mbox{\hyperlink{group__list__functions_ga71cf81b333456565da2bfedd04fc250a}{Qore\+::sort\+\_\+descending}} (\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} l)
\begin{DoxyCompactList}\small\item\em Performs an unstable sort in descending order and returns the new list. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} \mbox{\hyperlink{group__list__functions_gabe7d4c00c333cacb20fffdbd8af8364b}{Qore\+::sort\+\_\+descending}} (\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} l, \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} func)
\begin{DoxyCompactList}\small\item\em Performs an unstable sort in descending order and returns the new list; accepts the name of a function to use to sort complex data types or to give a special sort order. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} \mbox{\hyperlink{group__list__functions_gaa2781006d3743acbba8429f8b6fbdef8}{Qore\+::sort\+\_\+descending}} (\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} l, code f)
\begin{DoxyCompactList}\small\item\em Performs an unstable sort in descending order and returns the new list; accepts a \mbox{\hyperlink{expressions_call_reference}{call reference}} or a \mbox{\hyperlink{expressions_closure}{closure}} to use to sort complex data types or to give a special sort order. \end{DoxyCompactList}\item 
auto \mbox{\hyperlink{group__list__functions_ga59bf2466a7bd64db585ad1b2b5f7ae7d}{Qore\+::sort\+\_\+descending\+\_\+stable}} (auto arg)
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} \mbox{\hyperlink{group__list__functions_ga76072fdfbe69de97be99ad63d87b695e}{Qore\+::sort\+\_\+descending\+\_\+stable}} (\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} l)
\begin{DoxyCompactList}\small\item\em Performs a stable sort in descending order and returns the new list. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} \mbox{\hyperlink{group__list__functions_ga55196b17f01e778d3a49c3c0774d67a2}{Qore\+::sort\+\_\+descending\+\_\+stable}} (\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} l, \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} func)
\begin{DoxyCompactList}\small\item\em Performs a stable sort in descending order and returns the new list; accepts the name of a function to use to sort complex data types or to give a special sort order. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} \mbox{\hyperlink{group__list__functions_ga01eb44aa72dab7be4b668e3497a45f13}{Qore\+::sort\+\_\+descending\+\_\+stable}} (\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} l, code f)
\begin{DoxyCompactList}\small\item\em Performs a stable sort in descending order and returns the new list; accepts a \mbox{\hyperlink{expressions_call_reference}{call reference}} or a \mbox{\hyperlink{expressions_closure}{closure}} to use to sort complex data types or to give a special sort order. \end{DoxyCompactList}\item 
auto \mbox{\hyperlink{group__list__functions_gad03629b1133f3a6b47a2f33792801dbf}{Qore\+::sort\+\_\+stable}} (auto arg)
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} \mbox{\hyperlink{group__list__functions_ga174bab5664145eda23c3fe466551b9db}{Qore\+::sort\+\_\+stable}} (\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} l)
\begin{DoxyCompactList}\small\item\em Performs a stable sort in ascending order and returns the new list. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} \mbox{\hyperlink{group__list__functions_ga6942045acf34df088279867761059421}{Qore\+::sort\+\_\+stable}} (\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} l, \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} func)
\begin{DoxyCompactList}\small\item\em Performs a stable sort in ascending order and returns the new list; accepts the name of a function to use to sort complex data types or to give a special sort order. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} \mbox{\hyperlink{group__list__functions_ga9d8c81838f1c5d3029a167f16ccdfbb4}{Qore\+::sort\+\_\+stable}} (\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} l, code f)
\begin{DoxyCompactList}\small\item\em Performs a stable sort in ascending order and returns the new list; accepts a \mbox{\hyperlink{expressions_call_reference}{call reference}} or a \mbox{\hyperlink{expressions_closure}{closure}} to use to sort complex data types or to give a special sort order. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
List functions 

\subsection{Function Documentation}
\mbox{\Hypertarget{group__list__functions_ga776993c1408e78f466e9b11aff7ecc46}\label{group__list__functions_ga776993c1408e78f466e9b11aff7ecc46}} 
\index{List Functions@{List Functions}!inlist@{inlist}}
\index{inlist@{inlist}!List Functions@{List Functions}}
\subsubsection{\texorpdfstring{inlist()}{inlist()}\hspace{0.1cm}{\footnotesize\ttfamily [1/3]}}
{\footnotesize\ttfamily bool Qore\+::inlist (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_NOOP}{N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__list__functions_ga67118489d63343ab95f887d785157c51}\label{group__list__functions_ga67118489d63343ab95f887d785157c51}} 
\index{List Functions@{List Functions}!inlist@{inlist}}
\index{inlist@{inlist}!List Functions@{List Functions}}
\subsubsection{\texorpdfstring{inlist()}{inlist()}\hspace{0.1cm}{\footnotesize\ttfamily [2/3]}}
{\footnotesize\ttfamily bool Qore\+::inlist (\begin{DoxyParamCaption}\item[{any}]{arg,  }\item[{nothing}]{x }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_NOOP}{N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__list__functions_ga27907f4f9f10c03851559e6e9991b14e}\label{group__list__functions_ga27907f4f9f10c03851559e6e9991b14e}} 
\index{List Functions@{List Functions}!inlist@{inlist}}
\index{inlist@{inlist}!List Functions@{List Functions}}
\subsubsection{\texorpdfstring{inlist()}{inlist()}\hspace{0.1cm}{\footnotesize\ttfamily [3/3]}}
{\footnotesize\ttfamily bool Qore\+::inlist (\begin{DoxyParamCaption}\item[{auto}]{arg,  }\item[{softlist}]{l }\end{DoxyParamCaption})}



Returns \mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}} if the first argument is a member of the second argument list using soft comparisons (with implicit type conversions), \mbox{\hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False}} if not. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
\textcolor{keywordflow}{if} (\mbox{\hyperlink{group__list__functions_ga776993c1408e78f466e9b11aff7ecc46}{inlist}}(str, strlist))
    \mbox{\hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}}(\textcolor{stringliteral}{"%y is in %y\(\backslash\)n"}, str, strlist);
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em arg} & the argument to look for in the list \\
\hline
{\em l} & the list to search for the first argument {\itshape arg} \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}} if the first argument is a member of the second argument list using soft comparisons (with implicit type conversions), \mbox{\hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False}} if not
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
inlist\+\_\+hard(any, softlist) 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__list__functions_ga1fdf41e61754093da9f8a3b40e2a9cea}\label{group__list__functions_ga1fdf41e61754093da9f8a3b40e2a9cea}} 
\index{List Functions@{List Functions}!inlist\+\_\+hard@{inlist\+\_\+hard}}
\index{inlist\+\_\+hard@{inlist\+\_\+hard}!List Functions@{List Functions}}
\subsubsection{\texorpdfstring{inlist\+\_\+hard()}{inlist\_hard()}\hspace{0.1cm}{\footnotesize\ttfamily [1/3]}}
{\footnotesize\ttfamily bool Qore\+::inlist\+\_\+hard (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_NOOP}{N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__list__functions_ga4668ef52b2c07e8768118bc7c8638414}\label{group__list__functions_ga4668ef52b2c07e8768118bc7c8638414}} 
\index{List Functions@{List Functions}!inlist\+\_\+hard@{inlist\+\_\+hard}}
\index{inlist\+\_\+hard@{inlist\+\_\+hard}!List Functions@{List Functions}}
\subsubsection{\texorpdfstring{inlist\+\_\+hard()}{inlist\_hard()}\hspace{0.1cm}{\footnotesize\ttfamily [2/3]}}
{\footnotesize\ttfamily bool Qore\+::inlist\+\_\+hard (\begin{DoxyParamCaption}\item[{any}]{arg,  }\item[{nothing}]{x }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_NOOP}{N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__list__functions_ga97794840ca563f15317706b036b07efa}\label{group__list__functions_ga97794840ca563f15317706b036b07efa}} 
\index{List Functions@{List Functions}!inlist\+\_\+hard@{inlist\+\_\+hard}}
\index{inlist\+\_\+hard@{inlist\+\_\+hard}!List Functions@{List Functions}}
\subsubsection{\texorpdfstring{inlist\+\_\+hard()}{inlist\_hard()}\hspace{0.1cm}{\footnotesize\ttfamily [3/3]}}
{\footnotesize\ttfamily bool Qore\+::inlist\+\_\+hard (\begin{DoxyParamCaption}\item[{auto}]{arg,  }\item[{softlist}]{l }\end{DoxyParamCaption})}



Returns \mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}} if the first argument is a member of the second argument list using hard comparisons (without any implicit type conversions), \mbox{\hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False}} if not. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
\textcolor{keywordflow}{if} (\mbox{\hyperlink{group__list__functions_ga1fdf41e61754093da9f8a3b40e2a9cea}{inlist\_hard}}(str, strlist))
    \mbox{\hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}}(\textcolor{stringliteral}{"%y is in %y\(\backslash\)n"}, str, strlist);
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em arg} & the argument to look for in the list \\
\hline
{\em l} & the list to search for the first argument {\itshape arg} \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}} if the first argument is a member of the second argument list using hard comparisons (without any implicit type conversions), \mbox{\hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False}} if not
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
inlist(any, softlist) 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__list__functions_ga765d602af09d495774ed996a4991d638}\label{group__list__functions_ga765d602af09d495774ed996a4991d638}} 
\index{List Functions@{List Functions}!max@{max}}
\index{max@{max}!List Functions@{List Functions}}
\subsubsection{\texorpdfstring{max()}{max()}\hspace{0.1cm}{\footnotesize\ttfamily [1/4]}}
{\footnotesize\ttfamily auto Qore\+::max (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}}}]{l }\end{DoxyParamCaption})}



Returns the maximum value in a list. 

This variant will only work on basic data types

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
auto v = \mbox{\hyperlink{group__list__functions_ga765d602af09d495774ed996a4991d638}{max}}(l);
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em l} & the list to process\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the maximum value in a list
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__list__functions_ga0a12d0a98055d7f4804adae35a1d149b}{min(list)}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__list__functions_gaf8c5fe3ac64fac2eab1f17d0b032d368}\label{group__list__functions_gaf8c5fe3ac64fac2eab1f17d0b032d368}} 
\index{List Functions@{List Functions}!max@{max}}
\index{max@{max}!List Functions@{List Functions}}
\subsubsection{\texorpdfstring{max()}{max()}\hspace{0.1cm}{\footnotesize\ttfamily [2/4]}}
{\footnotesize\ttfamily auto Qore\+::max (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}}}]{l,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{func }\end{DoxyParamCaption})}



Returns the maximum value in a list; accepts the name of a function to use to compare complex data types or to give a special sort order. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
auto v = \mbox{\hyperlink{group__list__functions_ga765d602af09d495774ed996a4991d638}{max}}(l, \textcolor{stringliteral}{"my\_sort\_function"});
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em l} & the list to sort \\
\hline
{\em func} & the name of a function accessible in the current scope that accepts 2 arguments of the data type in the list; the function must return -\/1, 0, or 1 if the first is less than the second, if the first and second are equal, or if the first is greater than the second, respectively\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the maximum value in a list
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__list__functions_gae73e31eaecf7e92eb42c6ec0526225ad}{min(list, string)}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__list__functions_gaeb8d7938f787f3b72767aa1286c12f4d}\label{group__list__functions_gaeb8d7938f787f3b72767aa1286c12f4d}} 
\index{List Functions@{List Functions}!max@{max}}
\index{max@{max}!List Functions@{List Functions}}
\subsubsection{\texorpdfstring{max()}{max()}\hspace{0.1cm}{\footnotesize\ttfamily [3/4]}}
{\footnotesize\ttfamily auto Qore\+::max (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}}}]{l,  }\item[{code}]{f }\end{DoxyParamCaption})}



Returns the maximum value in a list; accepts a \mbox{\hyperlink{expressions_call_reference}{call reference}} or a \mbox{\hyperlink{expressions_closure}{closure}} to use to compare complex data types or to give a special sort order. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
code sort\_func = int sub (hash l, hash r) \{ \textcolor{keywordflow}{return} l.id <=> r.id; \};
auto v = \mbox{\hyperlink{group__list__functions_ga765d602af09d495774ed996a4991d638}{max}}(l, sort\_func);
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em l} & the list to sort \\
\hline
{\em f} & a \mbox{\hyperlink{expressions_call_reference}{call reference}} or a \mbox{\hyperlink{expressions_closure}{closure}} that accepts 2 arguments of the data type in the list; the \mbox{\hyperlink{expressions_call_reference}{call reference}} or a \mbox{\hyperlink{expressions_closure}{closure}} must return -\/1, 0, or 1 if the first is less than the second, if the first and second are equal, or if the first is greater than the second, respectively\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the maximum value in a list
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__list__functions_ga433b73fc23f12156420b977ac62f6e00}{min(list, code)}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__list__functions_ga748c43cafa3ab5aef9e24d983e89f047}\label{group__list__functions_ga748c43cafa3ab5aef9e24d983e89f047}} 
\index{List Functions@{List Functions}!max@{max}}
\index{max@{max}!List Functions@{List Functions}}
\subsubsection{\texorpdfstring{max()}{max()}\hspace{0.1cm}{\footnotesize\ttfamily [4/4]}}
{\footnotesize\ttfamily auto Qore\+::max (\begin{DoxyParamCaption}\item[{}]{... }\end{DoxyParamCaption})}



Returns the maximum value of the arguments passed to the function. 

This variant will only work on basic data types

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
auto v = \mbox{\hyperlink{group__list__functions_ga765d602af09d495774ed996a4991d638}{max}}(v1, v2, v3);
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em ...} & the list of values to process given directly to the function\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the maximum value in a list
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__list__functions_ga0a12d0a98055d7f4804adae35a1d149b}{min}}(...) 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__list__functions_ga0a12d0a98055d7f4804adae35a1d149b}\label{group__list__functions_ga0a12d0a98055d7f4804adae35a1d149b}} 
\index{List Functions@{List Functions}!min@{min}}
\index{min@{min}!List Functions@{List Functions}}
\subsubsection{\texorpdfstring{min()}{min()}\hspace{0.1cm}{\footnotesize\ttfamily [1/4]}}
{\footnotesize\ttfamily auto Qore\+::min (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}}}]{l }\end{DoxyParamCaption})}



Returns the minumum value in a list. 

This variant will only work on basic data types

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
auto v = \mbox{\hyperlink{group__list__functions_ga0a12d0a98055d7f4804adae35a1d149b}{min}}(l);
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em l} & the list to process\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the minumum value in a list
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__list__functions_ga765d602af09d495774ed996a4991d638}{max(list)}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__list__functions_gae73e31eaecf7e92eb42c6ec0526225ad}\label{group__list__functions_gae73e31eaecf7e92eb42c6ec0526225ad}} 
\index{List Functions@{List Functions}!min@{min}}
\index{min@{min}!List Functions@{List Functions}}
\subsubsection{\texorpdfstring{min()}{min()}\hspace{0.1cm}{\footnotesize\ttfamily [2/4]}}
{\footnotesize\ttfamily auto Qore\+::min (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}}}]{l,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{func }\end{DoxyParamCaption})}



Returns the minumum value in a list; accepts the name of a function to use to compare complex data types or to give a special sort order. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
auto v = \mbox{\hyperlink{group__list__functions_ga0a12d0a98055d7f4804adae35a1d149b}{min}}(l, \textcolor{stringliteral}{"my\_sort\_function"});
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em l} & the list to sort \\
\hline
{\em func} & the name of a function accessible in the current scope that accepts 2 arguments of the data type in the list; the function must return -\/1, 0, or 1 if the first is less than the second, if the first and second are equal, or if the first is greater than the second, respectively\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the minumum value in a list
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__list__functions_gaf8c5fe3ac64fac2eab1f17d0b032d368}{max(list, string)}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__list__functions_ga433b73fc23f12156420b977ac62f6e00}\label{group__list__functions_ga433b73fc23f12156420b977ac62f6e00}} 
\index{List Functions@{List Functions}!min@{min}}
\index{min@{min}!List Functions@{List Functions}}
\subsubsection{\texorpdfstring{min()}{min()}\hspace{0.1cm}{\footnotesize\ttfamily [3/4]}}
{\footnotesize\ttfamily auto Qore\+::min (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}}}]{l,  }\item[{code}]{f }\end{DoxyParamCaption})}



Returns the minumum value in a list; accepts a \mbox{\hyperlink{expressions_call_reference}{call reference}} or a \mbox{\hyperlink{expressions_closure}{closure}} to use to compare complex data types or to give a special sort order. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
code sort\_func = int sub (hash l, hash r) \{ \textcolor{keywordflow}{return} l.id <=> r.id; \};
auto v = \mbox{\hyperlink{group__list__functions_ga0a12d0a98055d7f4804adae35a1d149b}{min}}(l, sort\_func);
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em l} & the list to sort \\
\hline
{\em f} & a \mbox{\hyperlink{expressions_call_reference}{call reference}} or a \mbox{\hyperlink{expressions_closure}{closure}} that accepts 2 arguments of the data type in the list; the \mbox{\hyperlink{expressions_call_reference}{call reference}} or a \mbox{\hyperlink{expressions_closure}{closure}} must return -\/1, 0, or 1 if the first is less than the second, if the first and second are equal, or if the first is greater than the second, respectively\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the minumum value in a list
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__list__functions_gaeb8d7938f787f3b72767aa1286c12f4d}{max(list, code)}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__list__functions_gadd91030761ee2fa0b1783f76b2ea467c}\label{group__list__functions_gadd91030761ee2fa0b1783f76b2ea467c}} 
\index{List Functions@{List Functions}!min@{min}}
\index{min@{min}!List Functions@{List Functions}}
\subsubsection{\texorpdfstring{min()}{min()}\hspace{0.1cm}{\footnotesize\ttfamily [4/4]}}
{\footnotesize\ttfamily auto Qore\+::min (\begin{DoxyParamCaption}\item[{}]{... }\end{DoxyParamCaption})}



Returns the minumum value of the arguments passed to the function. 

This variant will only work on basic data types

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
auto v = \mbox{\hyperlink{group__list__functions_ga0a12d0a98055d7f4804adae35a1d149b}{min}}(v1, v2, v3);
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em ...} & the list of values to process given directly to the function\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the minumum value in a list
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__list__functions_ga765d602af09d495774ed996a4991d638}{max}}(...) 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__list__functions_gabf1a283eed97fa22a32be14b30add9e6}\label{group__list__functions_gabf1a283eed97fa22a32be14b30add9e6}} 
\index{List Functions@{List Functions}!range@{range}}
\index{range@{range}!List Functions@{List Functions}}
\subsubsection{\texorpdfstring{range()}{range()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} Qore\+::range (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}}]{start,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}}]{stop,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}}]{step = {\ttfamily 1} }\end{DoxyParamCaption})}



Returns a list containing an arithmetic progression of integers. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
\mbox{\hyperlink{group__list__functions_gabf1a283eed97fa22a32be14b30add9e6}{range}}(2, 5); \textcolor{comment}{# (2, 3, 4, 5)}
\mbox{\hyperlink{group__list__functions_gabf1a283eed97fa22a32be14b30add9e6}{range}}(2, -2); \textcolor{comment}{# (2, 1, 0, -1, -2)}
\mbox{\hyperlink{group__list__functions_gabf1a283eed97fa22a32be14b30add9e6}{range}}(1, 10, 5); \textcolor{comment}{# (1, 6)}
\mbox{\hyperlink{group__list__functions_gabf1a283eed97fa22a32be14b30add9e6}{range}}(0, 10, 5); \textcolor{comment}{# (0, 5, 10)}
\mbox{\hyperlink{group__list__functions_gabf1a283eed97fa22a32be14b30add9e6}{range}}(-10, 10, 5); \textcolor{comment}{# (-10, -5, 0, 5, 10)}
\mbox{\hyperlink{group__list__functions_gabf1a283eed97fa22a32be14b30add9e6}{range}}(10, -10, 5); \textcolor{comment}{# (10, 5, 0, -5, -10)}
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em start} & the initial value \\
\hline
{\em stop} & the final value \\
\hline
{\em step} & the step; the default is 1; must be greater than 0; the function throws a {\ttfamily R\+A\+N\+G\+E-\/\+E\+R\+R\+OR} exception when this argument is $<$ 1\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Returns a list containing an arithmetic progression of integers.
\end{DoxyReturn}

\begin{DoxyExceptions}{Exceptions}
{\em R\+A\+N\+G\+E-\/\+E\+R\+R\+OR} & this exception is thrown if {\ttfamily step} $<$ 1\\
\hline
\end{DoxyExceptions}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__range__functions_gad5b4d3ad3f6c36d2e714bc6ed757a507}{xrange}}
\end{DoxySeeAlso}
\begin{DoxyNote}{Note}
the main difference between \mbox{\hyperlink{group__list__functions_gabf1a283eed97fa22a32be14b30add9e6}{range()}} and \mbox{\hyperlink{group__range__functions_gad5b4d3ad3f6c36d2e714bc6ed757a507}{xrange()}} is that range returns real list and xrange returns a \mbox{\hyperlink{class_qore_1_1_range_iterator}{Range\+Iterator}}
\end{DoxyNote}
\begin{DoxySince}{Since}
Qore 0.\+8.\+6 
\end{DoxySince}
\mbox{\Hypertarget{group__list__functions_ga5323b7e10aa589da12e6790f15711fb0}\label{group__list__functions_ga5323b7e10aa589da12e6790f15711fb0}} 
\index{List Functions@{List Functions}!range@{range}}
\index{range@{range}!List Functions@{List Functions}}
\subsubsection{\texorpdfstring{range()}{range()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} Qore\+::range (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}}]{stop }\end{DoxyParamCaption})}



Returns a list containing an arithmetic progression of integers with start = 0 and step = 1. 

This is an overloaded version of \mbox{\hyperlink{group__list__functions_gabf1a283eed97fa22a32be14b30add9e6}{range(int, int, int)}} meaning {\ttfamily range}(0, {\ttfamily stop}, 1)

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
\mbox{\hyperlink{group__list__functions_gabf1a283eed97fa22a32be14b30add9e6}{range}}(1); \textcolor{comment}{# (0, 1)}
\mbox{\hyperlink{group__list__functions_gabf1a283eed97fa22a32be14b30add9e6}{range}}(-3); \textcolor{comment}{# (0, -1, -2, -3)}
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em stop} & the final value\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Returns a list containing an arithmetic progression of integers with start = 0 and step = 1.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__range__functions_gad5b4d3ad3f6c36d2e714bc6ed757a507}{xrange}}
\end{DoxySeeAlso}
\begin{DoxyNote}{Note}
the main difference between \mbox{\hyperlink{group__list__functions_gabf1a283eed97fa22a32be14b30add9e6}{range()}} and \mbox{\hyperlink{group__range__functions_gad5b4d3ad3f6c36d2e714bc6ed757a507}{xrange()}} is that range returns real list and xrange returns a \mbox{\hyperlink{class_qore_1_1_range_iterator}{Range\+Iterator}}
\end{DoxyNote}
\begin{DoxySince}{Since}
Qore 0.\+8.\+6 
\end{DoxySince}
\mbox{\Hypertarget{group__list__functions_ga8d6317ddd1278a3a8ee255ec160333c3}\label{group__list__functions_ga8d6317ddd1278a3a8ee255ec160333c3}} 
\index{List Functions@{List Functions}!reverse@{reverse}}
\index{reverse@{reverse}!List Functions@{List Functions}}
\subsubsection{\texorpdfstring{reverse()}{reverse()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily nothing Qore\+::reverse (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_NOOP}{N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__list__functions_ga690f86a8283a28ab077a542a0d60b8c3}\label{group__list__functions_ga690f86a8283a28ab077a542a0d60b8c3}} 
\index{List Functions@{List Functions}!reverse@{reverse}}
\index{reverse@{reverse}!List Functions@{List Functions}}
\subsubsection{\texorpdfstring{reverse()}{reverse()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} Qore\+::reverse (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}}}]{l }\end{DoxyParamCaption})}



Reverses a list and returns the new list. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
list nl = \mbox{\hyperlink{group__string__functions_ga1a77feb53e86b659be6d9eea7d3618e8}{reverse}}(l);
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em l} & the list to reverse\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the given list with all elements in reverse order
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
reverse(string) 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__list__functions_gaff8cac5bd5ffb29fb750e273e4e8fe92}\label{group__list__functions_gaff8cac5bd5ffb29fb750e273e4e8fe92}} 
\index{List Functions@{List Functions}!sort@{sort}}
\index{sort@{sort}!List Functions@{List Functions}}
\subsubsection{\texorpdfstring{sort()}{sort()}\hspace{0.1cm}{\footnotesize\ttfamily [1/4]}}
{\footnotesize\ttfamily auto Qore\+::sort (\begin{DoxyParamCaption}\item[{auto}]{arg }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_NOOP}{N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__list__functions_ga92f1bef2e1d3e7553899161035ebce7f}\label{group__list__functions_ga92f1bef2e1d3e7553899161035ebce7f}} 
\index{List Functions@{List Functions}!sort@{sort}}
\index{sort@{sort}!List Functions@{List Functions}}
\subsubsection{\texorpdfstring{sort()}{sort()}\hspace{0.1cm}{\footnotesize\ttfamily [2/4]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} Qore\+::sort (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}}}]{l }\end{DoxyParamCaption})}



Performs an unstable sort in ascending order and returns the new list. 

This variant will only sort basic data types

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
list nl = \mbox{\hyperlink{group__list__functions_gaff8cac5bd5ffb29fb750e273e4e8fe92}{sort}}(l);
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em l} & the list to sort\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the sorted list
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__list__functions_ga15501b975140857b6db1060fcc14f099}{sort\+Stable(list)}}
\item \mbox{\hyperlink{group__list__functions_ga99855545ae07a5c89b2aa7daa20c240e}{sort\+Descending\+Stable(list)}}
\item \mbox{\hyperlink{group__list__functions_ga357f2c1db2247e470ab9a4e2d143dc7a}{sort\+Descending(list)}} 
\end{DoxyItemize}
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__list__functions_ga685a5306bdc7d39d7d0f22f4a39f9cc0}\label{group__list__functions_ga685a5306bdc7d39d7d0f22f4a39f9cc0}} 
\index{List Functions@{List Functions}!sort@{sort}}
\index{sort@{sort}!List Functions@{List Functions}}
\subsubsection{\texorpdfstring{sort()}{sort()}\hspace{0.1cm}{\footnotesize\ttfamily [3/4]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} Qore\+::sort (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}}}]{l,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{func }\end{DoxyParamCaption})}



Performs an unstable sort in ascending order and returns the new list; accepts the name of a function to use to sort complex data types or to give a special sort order. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
list nl = \mbox{\hyperlink{group__list__functions_gaff8cac5bd5ffb29fb750e273e4e8fe92}{sort}}(l, \textcolor{stringliteral}{"my\_sort\_function"});
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em l} & the list to sort \\
\hline
{\em func} & the name of a function accessible in the current scope that accepts 2 arguments of the data type in the list; the function must return -\/1, 0, or 1 if the first is less than the second, if the first and second are equal, or if the first is greater than the second, respectively\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the sorted list
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__list__functions_gaa57833641818b74e7f3ce0b78b0aa935}{sort\+Stable(list, string)}}
\item \mbox{\hyperlink{group__list__functions_ga50acfbff38f01a80c572caae9954511c}{sort\+Descending\+Stable(list, string)}}
\item \mbox{\hyperlink{group__list__functions_ga8b3017c54bb55091ffc345e29eba5066}{sort\+Descending(list, string)}} 
\end{DoxyItemize}
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__list__functions_gacbf1017e94fb40ebba2911cb0c0013c1}\label{group__list__functions_gacbf1017e94fb40ebba2911cb0c0013c1}} 
\index{List Functions@{List Functions}!sort@{sort}}
\index{sort@{sort}!List Functions@{List Functions}}
\subsubsection{\texorpdfstring{sort()}{sort()}\hspace{0.1cm}{\footnotesize\ttfamily [4/4]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} Qore\+::sort (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}}}]{l,  }\item[{code}]{f }\end{DoxyParamCaption})}



Performs an unstable sort in ascending order and returns the new list; accepts a \mbox{\hyperlink{expressions_call_reference}{call reference}} or a \mbox{\hyperlink{expressions_closure}{closure}} to use to sort complex data types or to give a special sort order. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
code sort\_func = int sub (hash l, hash r) \{ \textcolor{keywordflow}{return} l.id <=> r.id; \};
list nl = \mbox{\hyperlink{group__list__functions_gaff8cac5bd5ffb29fb750e273e4e8fe92}{sort}}(l, sort\_func);
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em l} & the list to sort \\
\hline
{\em f} & a \mbox{\hyperlink{expressions_call_reference}{call reference}} or a \mbox{\hyperlink{expressions_closure}{closure}} that accepts 2 arguments of the data type in the list; the code must return -\/1, 0, or 1 if the first is less than the second, if the first and second are equal, or if the first is greater than the second, respectively\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the sorted list
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__list__functions_gabf5874986356a836b4f330b2e9c34fa4}{sort\+Stable(list, code)}}
\item \mbox{\hyperlink{group__list__functions_ga94b9f84a8380f641e8268af5bea407c8}{sort\+Descending\+Stable(list, code)}}
\item \mbox{\hyperlink{group__list__functions_ga5a2df667b83aa3ec79c8154e7f4ba151}{sort\+Descending(list, code)}} 
\end{DoxyItemize}
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__list__functions_ga0149391f4fb2c97dd4ad2080f9240753}\label{group__list__functions_ga0149391f4fb2c97dd4ad2080f9240753}} 
\index{List Functions@{List Functions}!sort\+\_\+descending@{sort\+\_\+descending}}
\index{sort\+\_\+descending@{sort\+\_\+descending}!List Functions@{List Functions}}
\subsubsection{\texorpdfstring{sort\+\_\+descending()}{sort\_descending()}\hspace{0.1cm}{\footnotesize\ttfamily [1/4]}}
{\footnotesize\ttfamily auto Qore\+::sort\+\_\+descending (\begin{DoxyParamCaption}\item[{auto}]{arg }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_NOOP}{N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__list__functions_ga71cf81b333456565da2bfedd04fc250a}\label{group__list__functions_ga71cf81b333456565da2bfedd04fc250a}} 
\index{List Functions@{List Functions}!sort\+\_\+descending@{sort\+\_\+descending}}
\index{sort\+\_\+descending@{sort\+\_\+descending}!List Functions@{List Functions}}
\subsubsection{\texorpdfstring{sort\+\_\+descending()}{sort\_descending()}\hspace{0.1cm}{\footnotesize\ttfamily [2/4]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} Qore\+::sort\+\_\+descending (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}}}]{l }\end{DoxyParamCaption})}



Performs an unstable sort in descending order and returns the new list. 

This variant will only sort basic data types

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
list nl = \mbox{\hyperlink{group__list__functions_ga0149391f4fb2c97dd4ad2080f9240753}{sort\_descending}}(l);
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em l} & the list to sort\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the sorted list
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__list__functions_ga92f1bef2e1d3e7553899161035ebce7f}{sort(list)}}
\item \mbox{\hyperlink{group__list__functions_ga99855545ae07a5c89b2aa7daa20c240e}{sort\+Descending\+Stable(list)}}
\item \mbox{\hyperlink{group__list__functions_ga15501b975140857b6db1060fcc14f099}{sort\+Stable(list)}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+12 as a replacement for deprecated camel-\/case \mbox{\hyperlink{group__list__functions_gad9e205ca0a43f52a1388611b54521c19}{sort\+Descending()}} 
\end{DoxySince}
\mbox{\Hypertarget{group__list__functions_gabe7d4c00c333cacb20fffdbd8af8364b}\label{group__list__functions_gabe7d4c00c333cacb20fffdbd8af8364b}} 
\index{List Functions@{List Functions}!sort\+\_\+descending@{sort\+\_\+descending}}
\index{sort\+\_\+descending@{sort\+\_\+descending}!List Functions@{List Functions}}
\subsubsection{\texorpdfstring{sort\+\_\+descending()}{sort\_descending()}\hspace{0.1cm}{\footnotesize\ttfamily [3/4]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} Qore\+::sort\+\_\+descending (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}}}]{l,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{func }\end{DoxyParamCaption})}



Performs an unstable sort in descending order and returns the new list; accepts the name of a function to use to sort complex data types or to give a special sort order. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
list nl = \mbox{\hyperlink{group__list__functions_ga0149391f4fb2c97dd4ad2080f9240753}{sort\_descending}}(l, \textcolor{stringliteral}{"my\_sort\_function"});
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em l} & the list to sort \\
\hline
{\em func} & the name of a function accessible in the current scope that accepts 2 arguments of the data type in the list; the function must return -\/1, 0, or 1 if the first is less than the second, if the first and second are equal, or if the first is greater than the second, respectively\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the sorted list
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__list__functions_ga6942045acf34df088279867761059421}{sort\+\_\+stable(list, string)}}
\item sort\+\_\+descending\+Stable(list, string)
\item \mbox{\hyperlink{group__list__functions_ga685a5306bdc7d39d7d0f22f4a39f9cc0}{sort(list, string)}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+12 as a replacement for deprecated camel-\/case \mbox{\hyperlink{group__list__functions_gad9e205ca0a43f52a1388611b54521c19}{sort\+Descending()}} 
\end{DoxySince}
\mbox{\Hypertarget{group__list__functions_gaa2781006d3743acbba8429f8b6fbdef8}\label{group__list__functions_gaa2781006d3743acbba8429f8b6fbdef8}} 
\index{List Functions@{List Functions}!sort\+\_\+descending@{sort\+\_\+descending}}
\index{sort\+\_\+descending@{sort\+\_\+descending}!List Functions@{List Functions}}
\subsubsection{\texorpdfstring{sort\+\_\+descending()}{sort\_descending()}\hspace{0.1cm}{\footnotesize\ttfamily [4/4]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} Qore\+::sort\+\_\+descending (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}}}]{l,  }\item[{code}]{f }\end{DoxyParamCaption})}



Performs an unstable sort in descending order and returns the new list; accepts a \mbox{\hyperlink{expressions_call_reference}{call reference}} or a \mbox{\hyperlink{expressions_closure}{closure}} to use to sort complex data types or to give a special sort order. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
code sort\_func = int sub (hash l, hash r) \{ \textcolor{keywordflow}{return} l.id <=> r.id; \};
list nl = \mbox{\hyperlink{group__list__functions_ga0149391f4fb2c97dd4ad2080f9240753}{sort\_descending}}(l, sort\_func);
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em l} & the list to sort \\
\hline
{\em f} & a \mbox{\hyperlink{expressions_call_reference}{call reference}} or a \mbox{\hyperlink{expressions_closure}{closure}} that accepts 2 arguments of the data type in the list; the code must return -\/1, 0, or 1 if the first is less than the second, if the first and second are equal, or if the first is greater than the second, respectively\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the sorted list
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__list__functions_ga9d8c81838f1c5d3029a167f16ccdfbb4}{sort\+\_\+stable(list, code)}}
\item sort\+\_\+descending\+Stable(list, code)
\item \mbox{\hyperlink{group__list__functions_gacbf1017e94fb40ebba2911cb0c0013c1}{sort(list, code)}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+12 as a replacement for deprecated camel-\/case \mbox{\hyperlink{group__list__functions_gad9e205ca0a43f52a1388611b54521c19}{sort\+Descending()}} 
\end{DoxySince}
\mbox{\Hypertarget{group__list__functions_ga59bf2466a7bd64db585ad1b2b5f7ae7d}\label{group__list__functions_ga59bf2466a7bd64db585ad1b2b5f7ae7d}} 
\index{List Functions@{List Functions}!sort\+\_\+descending\+\_\+stable@{sort\+\_\+descending\+\_\+stable}}
\index{sort\+\_\+descending\+\_\+stable@{sort\+\_\+descending\+\_\+stable}!List Functions@{List Functions}}
\subsubsection{\texorpdfstring{sort\+\_\+descending\+\_\+stable()}{sort\_descending\_stable()}\hspace{0.1cm}{\footnotesize\ttfamily [1/4]}}
{\footnotesize\ttfamily auto Qore\+::sort\+\_\+descending\+\_\+stable (\begin{DoxyParamCaption}\item[{auto}]{arg }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_NOOP}{N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__list__functions_ga76072fdfbe69de97be99ad63d87b695e}\label{group__list__functions_ga76072fdfbe69de97be99ad63d87b695e}} 
\index{List Functions@{List Functions}!sort\+\_\+descending\+\_\+stable@{sort\+\_\+descending\+\_\+stable}}
\index{sort\+\_\+descending\+\_\+stable@{sort\+\_\+descending\+\_\+stable}!List Functions@{List Functions}}
\subsubsection{\texorpdfstring{sort\+\_\+descending\+\_\+stable()}{sort\_descending\_stable()}\hspace{0.1cm}{\footnotesize\ttfamily [2/4]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} Qore\+::sort\+\_\+descending\+\_\+stable (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}}}]{l }\end{DoxyParamCaption})}



Performs a stable sort in descending order and returns the new list. 

This variant will only sort basic data types

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
list nl = \mbox{\hyperlink{group__list__functions_ga59bf2466a7bd64db585ad1b2b5f7ae7d}{sort\_descending\_stable}}(l);
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em l} & the list to sort\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the sorted list
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__list__functions_ga9d8c81838f1c5d3029a167f16ccdfbb4}{sort\+\_\+stable(list, code)}}
\item \mbox{\hyperlink{group__list__functions_ga01eb44aa72dab7be4b668e3497a45f13}{sort\+\_\+descending\+\_\+stable(list, code)}}
\item \mbox{\hyperlink{group__list__functions_gacbf1017e94fb40ebba2911cb0c0013c1}{sort(list, code)}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+12 as a replacement for deprecated camel-\/case \mbox{\hyperlink{group__list__functions_gacd07eea87f385a0bb8764a9fa5b47075}{sort\+Descending\+Stable()}} 
\end{DoxySince}
\mbox{\Hypertarget{group__list__functions_ga55196b17f01e778d3a49c3c0774d67a2}\label{group__list__functions_ga55196b17f01e778d3a49c3c0774d67a2}} 
\index{List Functions@{List Functions}!sort\+\_\+descending\+\_\+stable@{sort\+\_\+descending\+\_\+stable}}
\index{sort\+\_\+descending\+\_\+stable@{sort\+\_\+descending\+\_\+stable}!List Functions@{List Functions}}
\subsubsection{\texorpdfstring{sort\+\_\+descending\+\_\+stable()}{sort\_descending\_stable()}\hspace{0.1cm}{\footnotesize\ttfamily [3/4]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} Qore\+::sort\+\_\+descending\+\_\+stable (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}}}]{l,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{func }\end{DoxyParamCaption})}



Performs a stable sort in descending order and returns the new list; accepts the name of a function to use to sort complex data types or to give a special sort order. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
list nl = \mbox{\hyperlink{group__list__functions_ga59bf2466a7bd64db585ad1b2b5f7ae7d}{sort\_descending\_stable}}(l, \textcolor{stringliteral}{"my\_sort\_function"});
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em l} & the list to sort \\
\hline
{\em func} & the name of a function accessible in the current scope that accepts 2 arguments of the data type in the list; the function must return -\/1, 0, or 1 if the first is less than the second, if the first and second are equal, or if the first is greater than the second, respectively\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the sorted list
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__list__functions_ga9d8c81838f1c5d3029a167f16ccdfbb4}{sort\+\_\+stable(list, code)}}
\item \mbox{\hyperlink{group__list__functions_ga01eb44aa72dab7be4b668e3497a45f13}{sort\+\_\+descending\+\_\+stable(list, code)}}
\item \mbox{\hyperlink{group__list__functions_gacbf1017e94fb40ebba2911cb0c0013c1}{sort(list, code)}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+12 as a replacement for deprecated camel-\/case \mbox{\hyperlink{group__list__functions_gacd07eea87f385a0bb8764a9fa5b47075}{sort\+Descending\+Stable()}} 
\end{DoxySince}
\mbox{\Hypertarget{group__list__functions_ga01eb44aa72dab7be4b668e3497a45f13}\label{group__list__functions_ga01eb44aa72dab7be4b668e3497a45f13}} 
\index{List Functions@{List Functions}!sort\+\_\+descending\+\_\+stable@{sort\+\_\+descending\+\_\+stable}}
\index{sort\+\_\+descending\+\_\+stable@{sort\+\_\+descending\+\_\+stable}!List Functions@{List Functions}}
\subsubsection{\texorpdfstring{sort\+\_\+descending\+\_\+stable()}{sort\_descending\_stable()}\hspace{0.1cm}{\footnotesize\ttfamily [4/4]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} Qore\+::sort\+\_\+descending\+\_\+stable (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}}}]{l,  }\item[{code}]{f }\end{DoxyParamCaption})}



Performs a stable sort in descending order and returns the new list; accepts a \mbox{\hyperlink{expressions_call_reference}{call reference}} or a \mbox{\hyperlink{expressions_closure}{closure}} to use to sort complex data types or to give a special sort order. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
code sort\_func = int sub (hash l, hash r) \{ \textcolor{keywordflow}{return} l.id <=> r.id; \};
list nl = \mbox{\hyperlink{group__list__functions_ga59bf2466a7bd64db585ad1b2b5f7ae7d}{sort\_descending\_stable}}(l, sort\_func);
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em l} & the list to sort \\
\hline
{\em f} & a \mbox{\hyperlink{expressions_call_reference}{call reference}} or a \mbox{\hyperlink{expressions_closure}{closure}} that accepts 2 arguments of the data type in the list; the code must return -\/1, 0, or 1 if the first is less than the second, if the first and second are equal, or if the first is greater than the second, respectively\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the sorted list
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__list__functions_ga9d8c81838f1c5d3029a167f16ccdfbb4}{sort\+\_\+stable(list, code)}}
\item \mbox{\hyperlink{group__list__functions_ga01eb44aa72dab7be4b668e3497a45f13}{sort\+\_\+descending\+\_\+stable(list, code)}}
\item \mbox{\hyperlink{group__list__functions_gacbf1017e94fb40ebba2911cb0c0013c1}{sort(list, code)}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+12 as a replacement for deprecated camel-\/case \mbox{\hyperlink{group__list__functions_gacd07eea87f385a0bb8764a9fa5b47075}{sort\+Descending\+Stable()}} 
\end{DoxySince}
\mbox{\Hypertarget{group__list__functions_gad03629b1133f3a6b47a2f33792801dbf}\label{group__list__functions_gad03629b1133f3a6b47a2f33792801dbf}} 
\index{List Functions@{List Functions}!sort\+\_\+stable@{sort\+\_\+stable}}
\index{sort\+\_\+stable@{sort\+\_\+stable}!List Functions@{List Functions}}
\subsubsection{\texorpdfstring{sort\+\_\+stable()}{sort\_stable()}\hspace{0.1cm}{\footnotesize\ttfamily [1/4]}}
{\footnotesize\ttfamily auto Qore\+::sort\+\_\+stable (\begin{DoxyParamCaption}\item[{auto}]{arg }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_NOOP}{N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__list__functions_ga174bab5664145eda23c3fe466551b9db}\label{group__list__functions_ga174bab5664145eda23c3fe466551b9db}} 
\index{List Functions@{List Functions}!sort\+\_\+stable@{sort\+\_\+stable}}
\index{sort\+\_\+stable@{sort\+\_\+stable}!List Functions@{List Functions}}
\subsubsection{\texorpdfstring{sort\+\_\+stable()}{sort\_stable()}\hspace{0.1cm}{\footnotesize\ttfamily [2/4]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} Qore\+::sort\+\_\+stable (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}}}]{l }\end{DoxyParamCaption})}



Performs a stable sort in ascending order and returns the new list. 

This variant will only sort basic data types

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
list nl = \mbox{\hyperlink{group__list__functions_gad03629b1133f3a6b47a2f33792801dbf}{sort\_stable}}(l);
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em l} & the list to sort\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the sorted list
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__list__functions_ga685a5306bdc7d39d7d0f22f4a39f9cc0}{sort(list, string)}}
\item \mbox{\hyperlink{group__list__functions_gabe7d4c00c333cacb20fffdbd8af8364b}{sort\+\_\+descending(list, string)}}
\item \mbox{\hyperlink{group__list__functions_ga55196b17f01e778d3a49c3c0774d67a2}{sort\+\_\+descending\+\_\+stable(list, string)}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+12 as a replacement for deprecated camel-\/case \mbox{\hyperlink{group__list__functions_ga6202469e6119631474b685952cefe11f}{sort\+Stable()}} 
\end{DoxySince}
\mbox{\Hypertarget{group__list__functions_ga6942045acf34df088279867761059421}\label{group__list__functions_ga6942045acf34df088279867761059421}} 
\index{List Functions@{List Functions}!sort\+\_\+stable@{sort\+\_\+stable}}
\index{sort\+\_\+stable@{sort\+\_\+stable}!List Functions@{List Functions}}
\subsubsection{\texorpdfstring{sort\+\_\+stable()}{sort\_stable()}\hspace{0.1cm}{\footnotesize\ttfamily [3/4]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} Qore\+::sort\+\_\+stable (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}}}]{l,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{func }\end{DoxyParamCaption})}



Performs a stable sort in ascending order and returns the new list; accepts the name of a function to use to sort complex data types or to give a special sort order. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
list nl = \mbox{\hyperlink{group__list__functions_gad03629b1133f3a6b47a2f33792801dbf}{sort\_stable}}(l, \textcolor{stringliteral}{"my\_sort\_function"});
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em l} & the list to sort \\
\hline
{\em func} & the name of a function accessible in the current scope that accepts 2 arguments of the data type in the list; the function must return -\/1, 0, or 1 if the first is less than the second, if the first and second are equal, or if the first is greater than the second, respectively\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the sorted list
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__list__functions_ga685a5306bdc7d39d7d0f22f4a39f9cc0}{sort(list, string)}}
\item \mbox{\hyperlink{group__list__functions_gabe7d4c00c333cacb20fffdbd8af8364b}{sort\+\_\+descending(list, string)}}
\item \mbox{\hyperlink{group__list__functions_ga55196b17f01e778d3a49c3c0774d67a2}{sort\+\_\+descending\+\_\+stable(list, string)}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+12 as a replacement for deprecated camel-\/case \mbox{\hyperlink{group__list__functions_ga6202469e6119631474b685952cefe11f}{sort\+Stable()}} 
\end{DoxySince}
\mbox{\Hypertarget{group__list__functions_ga9d8c81838f1c5d3029a167f16ccdfbb4}\label{group__list__functions_ga9d8c81838f1c5d3029a167f16ccdfbb4}} 
\index{List Functions@{List Functions}!sort\+\_\+stable@{sort\+\_\+stable}}
\index{sort\+\_\+stable@{sort\+\_\+stable}!List Functions@{List Functions}}
\subsubsection{\texorpdfstring{sort\+\_\+stable()}{sort\_stable()}\hspace{0.1cm}{\footnotesize\ttfamily [4/4]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} Qore\+::sort\+\_\+stable (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}}}]{l,  }\item[{code}]{f }\end{DoxyParamCaption})}



Performs a stable sort in ascending order and returns the new list; accepts a \mbox{\hyperlink{expressions_call_reference}{call reference}} or a \mbox{\hyperlink{expressions_closure}{closure}} to use to sort complex data types or to give a special sort order. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
code sort\_func = int sub (hash l, hash r) \{ \textcolor{keywordflow}{return} l.id <=> r.id; \};
list nl = \mbox{\hyperlink{group__list__functions_gad03629b1133f3a6b47a2f33792801dbf}{sort\_stable}}(l, sort\_func);
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em l} & the list to sort \\
\hline
{\em f} & a \mbox{\hyperlink{expressions_call_reference}{call reference}} or a \mbox{\hyperlink{expressions_closure}{closure}} that accepts 2 arguments of the data type in the list; the code must return -\/1, 0, or 1 if the first is less than the second, if the first and second are equal, or if the first is greater than the second, respectively\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the sorted list
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__list__functions_ga685a5306bdc7d39d7d0f22f4a39f9cc0}{sort(list, string)}}
\item \mbox{\hyperlink{group__list__functions_gabe7d4c00c333cacb20fffdbd8af8364b}{sort\+\_\+descending(list, string)}}
\item \mbox{\hyperlink{group__list__functions_ga55196b17f01e778d3a49c3c0774d67a2}{sort\+\_\+descending\+\_\+stable(list, string)}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+12 as a replacement for deprecated camel-\/case \mbox{\hyperlink{group__list__functions_ga6202469e6119631474b685952cefe11f}{sort\+Stable()}} 
\end{DoxySince}
\mbox{\Hypertarget{group__list__functions_gad9e205ca0a43f52a1388611b54521c19}\label{group__list__functions_gad9e205ca0a43f52a1388611b54521c19}} 
\index{List Functions@{List Functions}!sort\+Descending@{sort\+Descending}}
\index{sort\+Descending@{sort\+Descending}!List Functions@{List Functions}}
\subsubsection{\texorpdfstring{sort\+Descending()}{sortDescending()}\hspace{0.1cm}{\footnotesize\ttfamily [1/4]}}
{\footnotesize\ttfamily auto Qore\+::sort\+Descending (\begin{DoxyParamCaption}\item[{auto}]{arg }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_NOOP}{N\+O\+OP}}, \mbox{\hyperlink{code_flags_DEPRECATED}{D\+E\+P\+R\+E\+C\+A\+T\+ED}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__list__functions_ga357f2c1db2247e470ab9a4e2d143dc7a}\label{group__list__functions_ga357f2c1db2247e470ab9a4e2d143dc7a}} 
\index{List Functions@{List Functions}!sort\+Descending@{sort\+Descending}}
\index{sort\+Descending@{sort\+Descending}!List Functions@{List Functions}}
\subsubsection{\texorpdfstring{sort\+Descending()}{sortDescending()}\hspace{0.1cm}{\footnotesize\ttfamily [2/4]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} Qore\+::sort\+Descending (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}}}]{l }\end{DoxyParamCaption})}



Performs an unstable sort in descending order and returns the new list. 

This variant will only sort basic data types

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}, \mbox{\hyperlink{code_flags_DEPRECATED}{D\+E\+P\+R\+E\+C\+A\+T\+ED}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em l} & the list to sort\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the sorted list
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__list__functions_ga92f1bef2e1d3e7553899161035ebce7f}{sort(list)}}
\item \mbox{\hyperlink{group__list__functions_ga99855545ae07a5c89b2aa7daa20c240e}{sort\+Descending\+Stable(list)}}
\item \mbox{\hyperlink{group__list__functions_ga15501b975140857b6db1060fcc14f099}{sort\+Stable(list)}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxyRefDesc}{Deprecated}
\item[\mbox{\hyperlink{deprecated__deprecated000028}{Deprecated}}]use \mbox{\hyperlink{group__list__functions_ga0149391f4fb2c97dd4ad2080f9240753}{sort\+\_\+descending()}}; camel-\/case function names were deprecated in Qore 0.\+8.\+12 \end{DoxyRefDesc}
\mbox{\Hypertarget{group__list__functions_ga8b3017c54bb55091ffc345e29eba5066}\label{group__list__functions_ga8b3017c54bb55091ffc345e29eba5066}} 
\index{List Functions@{List Functions}!sort\+Descending@{sort\+Descending}}
\index{sort\+Descending@{sort\+Descending}!List Functions@{List Functions}}
\subsubsection{\texorpdfstring{sort\+Descending()}{sortDescending()}\hspace{0.1cm}{\footnotesize\ttfamily [3/4]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} Qore\+::sort\+Descending (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}}}]{l,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{func }\end{DoxyParamCaption})}



Performs an unstable sort in descending order and returns the new list; accepts the name of a function to use to sort complex data types or to give a special sort order. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}, \mbox{\hyperlink{code_flags_DEPRECATED}{D\+E\+P\+R\+E\+C\+A\+T\+ED}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em l} & the list to sort \\
\hline
{\em func} & the name of a function accessible in the current scope that accepts 2 arguments of the data type in the list; the function must return -\/1, 0, or 1 if the first is less than the second, if the first and second are equal, or if the first is greater than the second, respectively\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the sorted list
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__list__functions_gaa57833641818b74e7f3ce0b78b0aa935}{sort\+Stable(list, string)}}
\item \mbox{\hyperlink{group__list__functions_ga50acfbff38f01a80c572caae9954511c}{sort\+Descending\+Stable(list, string)}}
\item \mbox{\hyperlink{group__list__functions_ga685a5306bdc7d39d7d0f22f4a39f9cc0}{sort(list, string)}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxyRefDesc}{Deprecated}
\item[\mbox{\hyperlink{deprecated__deprecated000029}{Deprecated}}]use \mbox{\hyperlink{group__list__functions_ga0149391f4fb2c97dd4ad2080f9240753}{sort\+\_\+descending()}}; camel-\/case function names were deprecated in Qore 0.\+8.\+12 \end{DoxyRefDesc}
\mbox{\Hypertarget{group__list__functions_ga5a2df667b83aa3ec79c8154e7f4ba151}\label{group__list__functions_ga5a2df667b83aa3ec79c8154e7f4ba151}} 
\index{List Functions@{List Functions}!sort\+Descending@{sort\+Descending}}
\index{sort\+Descending@{sort\+Descending}!List Functions@{List Functions}}
\subsubsection{\texorpdfstring{sort\+Descending()}{sortDescending()}\hspace{0.1cm}{\footnotesize\ttfamily [4/4]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} Qore\+::sort\+Descending (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}}}]{l,  }\item[{code}]{f }\end{DoxyParamCaption})}



Performs an unstable sort in descending order and returns the new list; accepts a \mbox{\hyperlink{expressions_call_reference}{call reference}} or a \mbox{\hyperlink{expressions_closure}{closure}} to use to sort complex data types or to give a special sort order. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}}, \mbox{\hyperlink{code_flags_DEPRECATED}{D\+E\+P\+R\+E\+C\+A\+T\+ED}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em l} & the list to sort \\
\hline
{\em f} & a \mbox{\hyperlink{expressions_call_reference}{call reference}} or a \mbox{\hyperlink{expressions_closure}{closure}} that accepts 2 arguments of the data type in the list; the code must return -\/1, 0, or 1 if the first is less than the second, if the first and second are equal, or if the first is greater than the second, respectively\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the sorted list
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__list__functions_gabf5874986356a836b4f330b2e9c34fa4}{sort\+Stable(list, code)}}
\item \mbox{\hyperlink{group__list__functions_ga94b9f84a8380f641e8268af5bea407c8}{sort\+Descending\+Stable(list, code)}}
\item \mbox{\hyperlink{group__list__functions_gacbf1017e94fb40ebba2911cb0c0013c1}{sort(list, code)}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxyRefDesc}{Deprecated}
\item[\mbox{\hyperlink{deprecated__deprecated000030}{Deprecated}}]use \mbox{\hyperlink{group__list__functions_ga0149391f4fb2c97dd4ad2080f9240753}{sort\+\_\+descending()}}; camel-\/case function names were deprecated in Qore 0.\+8.\+12 \end{DoxyRefDesc}
\mbox{\Hypertarget{group__list__functions_gacd07eea87f385a0bb8764a9fa5b47075}\label{group__list__functions_gacd07eea87f385a0bb8764a9fa5b47075}} 
\index{List Functions@{List Functions}!sort\+Descending\+Stable@{sort\+Descending\+Stable}}
\index{sort\+Descending\+Stable@{sort\+Descending\+Stable}!List Functions@{List Functions}}
\subsubsection{\texorpdfstring{sort\+Descending\+Stable()}{sortDescendingStable()}\hspace{0.1cm}{\footnotesize\ttfamily [1/4]}}
{\footnotesize\ttfamily auto Qore\+::sort\+Descending\+Stable (\begin{DoxyParamCaption}\item[{auto}]{arg }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_NOOP}{N\+O\+OP}}, \mbox{\hyperlink{code_flags_DEPRECATED}{D\+E\+P\+R\+E\+C\+A\+T\+ED}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__list__functions_ga99855545ae07a5c89b2aa7daa20c240e}\label{group__list__functions_ga99855545ae07a5c89b2aa7daa20c240e}} 
\index{List Functions@{List Functions}!sort\+Descending\+Stable@{sort\+Descending\+Stable}}
\index{sort\+Descending\+Stable@{sort\+Descending\+Stable}!List Functions@{List Functions}}
\subsubsection{\texorpdfstring{sort\+Descending\+Stable()}{sortDescendingStable()}\hspace{0.1cm}{\footnotesize\ttfamily [2/4]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} Qore\+::sort\+Descending\+Stable (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}}}]{l }\end{DoxyParamCaption})}



Performs a stable sort in descending order and returns the new list. 

This variant will only sort basic data types

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}, \mbox{\hyperlink{code_flags_DEPRECATED}{D\+E\+P\+R\+E\+C\+A\+T\+ED}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
list nl = \mbox{\hyperlink{group__list__functions_gacd07eea87f385a0bb8764a9fa5b47075}{sortDescendingStable}}(l);
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em l} & the list to sort\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the sorted list
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__list__functions_ga9d8c81838f1c5d3029a167f16ccdfbb4}{sort\+\_\+stable(list, code)}}
\item \mbox{\hyperlink{group__list__functions_ga01eb44aa72dab7be4b668e3497a45f13}{sort\+\_\+descending\+\_\+stable(list, code)}}
\item \mbox{\hyperlink{group__list__functions_gacbf1017e94fb40ebba2911cb0c0013c1}{sort(list, code)}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxyRefDesc}{Deprecated}
\item[\mbox{\hyperlink{deprecated__deprecated000031}{Deprecated}}]use \mbox{\hyperlink{group__list__functions_ga59bf2466a7bd64db585ad1b2b5f7ae7d}{sort\+\_\+descending\+\_\+stable()}}; camel-\/case function names were deprecated in Qore 0.\+8.\+12 \end{DoxyRefDesc}
\mbox{\Hypertarget{group__list__functions_ga50acfbff38f01a80c572caae9954511c}\label{group__list__functions_ga50acfbff38f01a80c572caae9954511c}} 
\index{List Functions@{List Functions}!sort\+Descending\+Stable@{sort\+Descending\+Stable}}
\index{sort\+Descending\+Stable@{sort\+Descending\+Stable}!List Functions@{List Functions}}
\subsubsection{\texorpdfstring{sort\+Descending\+Stable()}{sortDescendingStable()}\hspace{0.1cm}{\footnotesize\ttfamily [3/4]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} Qore\+::sort\+Descending\+Stable (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}}}]{l,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{func }\end{DoxyParamCaption})}



Performs a stable sort in descending order and returns the new list; accepts the name of a function to use to sort complex data types or to give a special sort order. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}}, \mbox{\hyperlink{code_flags_DEPRECATED}{D\+E\+P\+R\+E\+C\+A\+T\+ED}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
list nl = \mbox{\hyperlink{group__list__functions_gad9e205ca0a43f52a1388611b54521c19}{sortDescending}}(l, \textcolor{stringliteral}{"my\_sort\_function"});
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em l} & the list to sort \\
\hline
{\em func} & the name of a function accessible in the current scope that accepts 2 arguments of the data type in the list; the function must return -\/1, 0, or 1 if the first is less than the second, if the first and second are equal, or if the first is greater than the second, respectively\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the sorted list
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__list__functions_ga9d8c81838f1c5d3029a167f16ccdfbb4}{sort\+\_\+stable(list, code)}}
\item \mbox{\hyperlink{group__list__functions_ga01eb44aa72dab7be4b668e3497a45f13}{sort\+\_\+descending\+\_\+stable(list, code)}}
\item \mbox{\hyperlink{group__list__functions_gacbf1017e94fb40ebba2911cb0c0013c1}{sort(list, code)}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxyRefDesc}{Deprecated}
\item[\mbox{\hyperlink{deprecated__deprecated000032}{Deprecated}}]use \mbox{\hyperlink{group__list__functions_ga59bf2466a7bd64db585ad1b2b5f7ae7d}{sort\+\_\+descending\+\_\+stable()}}; camel-\/case function names were deprecated in Qore 0.\+8.\+12 \end{DoxyRefDesc}
\mbox{\Hypertarget{group__list__functions_ga94b9f84a8380f641e8268af5bea407c8}\label{group__list__functions_ga94b9f84a8380f641e8268af5bea407c8}} 
\index{List Functions@{List Functions}!sort\+Descending\+Stable@{sort\+Descending\+Stable}}
\index{sort\+Descending\+Stable@{sort\+Descending\+Stable}!List Functions@{List Functions}}
\subsubsection{\texorpdfstring{sort\+Descending\+Stable()}{sortDescendingStable()}\hspace{0.1cm}{\footnotesize\ttfamily [4/4]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} Qore\+::sort\+Descending\+Stable (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}}}]{l,  }\item[{code}]{f }\end{DoxyParamCaption})}



Performs a stable sort in descending order and returns the new list; accepts a \mbox{\hyperlink{expressions_call_reference}{call reference}} or a \mbox{\hyperlink{expressions_closure}{closure}} to use to sort complex data types or to give a special sort order. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}}, \mbox{\hyperlink{code_flags_DEPRECATED}{D\+E\+P\+R\+E\+C\+A\+T\+ED}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
code sort\_func = int sub (hash l, hash r) \{ \textcolor{keywordflow}{return} l.id <=> r.id; \};
list nl = \mbox{\hyperlink{group__list__functions_gad9e205ca0a43f52a1388611b54521c19}{sortDescending}}(l, sort\_func);
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em l} & the list to sort \\
\hline
{\em f} & a \mbox{\hyperlink{expressions_call_reference}{call reference}} or a \mbox{\hyperlink{expressions_closure}{closure}} that accepts 2 arguments of the data type in the list; the code must return -\/1, 0, or 1 if the first is less than the second, if the first and second are equal, or if the first is greater than the second, respectively\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the sorted list
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__list__functions_ga9d8c81838f1c5d3029a167f16ccdfbb4}{sort\+\_\+stable(list, code)}}
\item \mbox{\hyperlink{group__list__functions_ga01eb44aa72dab7be4b668e3497a45f13}{sort\+\_\+descending\+\_\+stable(list, code)}}
\item \mbox{\hyperlink{group__list__functions_gacbf1017e94fb40ebba2911cb0c0013c1}{sort(list, code)}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxyRefDesc}{Deprecated}
\item[\mbox{\hyperlink{deprecated__deprecated000033}{Deprecated}}]use \mbox{\hyperlink{group__list__functions_ga59bf2466a7bd64db585ad1b2b5f7ae7d}{sort\+\_\+descending\+\_\+stable()}}; camel-\/case function names were deprecated in Qore 0.\+8.\+12 \end{DoxyRefDesc}
\mbox{\Hypertarget{group__list__functions_ga6202469e6119631474b685952cefe11f}\label{group__list__functions_ga6202469e6119631474b685952cefe11f}} 
\index{List Functions@{List Functions}!sort\+Stable@{sort\+Stable}}
\index{sort\+Stable@{sort\+Stable}!List Functions@{List Functions}}
\subsubsection{\texorpdfstring{sort\+Stable()}{sortStable()}\hspace{0.1cm}{\footnotesize\ttfamily [1/4]}}
{\footnotesize\ttfamily auto Qore\+::sort\+Stable (\begin{DoxyParamCaption}\item[{auto}]{arg }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_NOOP}{N\+O\+OP}}, \mbox{\hyperlink{code_flags_DEPRECATED}{D\+E\+P\+R\+E\+C\+A\+T\+ED}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__list__functions_ga15501b975140857b6db1060fcc14f099}\label{group__list__functions_ga15501b975140857b6db1060fcc14f099}} 
\index{List Functions@{List Functions}!sort\+Stable@{sort\+Stable}}
\index{sort\+Stable@{sort\+Stable}!List Functions@{List Functions}}
\subsubsection{\texorpdfstring{sort\+Stable()}{sortStable()}\hspace{0.1cm}{\footnotesize\ttfamily [2/4]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} Qore\+::sort\+Stable (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}}}]{l }\end{DoxyParamCaption})}



Performs a stable sort in ascending order and returns the new list. 

This variant will only sort basic data types

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}, \mbox{\hyperlink{code_flags_DEPRECATED}{D\+E\+P\+R\+E\+C\+A\+T\+ED}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em l} & the list to sort\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the sorted list
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__list__functions_ga685a5306bdc7d39d7d0f22f4a39f9cc0}{sort(list, string)}}
\item \mbox{\hyperlink{group__list__functions_gabe7d4c00c333cacb20fffdbd8af8364b}{sort\+\_\+descending(list, string)}}
\item \mbox{\hyperlink{group__list__functions_ga55196b17f01e778d3a49c3c0774d67a2}{sort\+\_\+descending\+\_\+stable(list, string)}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxyRefDesc}{Deprecated}
\item[\mbox{\hyperlink{deprecated__deprecated000034}{Deprecated}}]use \mbox{\hyperlink{group__list__functions_gad03629b1133f3a6b47a2f33792801dbf}{sort\+\_\+stable()}}; camel-\/case function names were deprecated in Qore 0.\+8.\+12 \end{DoxyRefDesc}
\mbox{\Hypertarget{group__list__functions_gaa57833641818b74e7f3ce0b78b0aa935}\label{group__list__functions_gaa57833641818b74e7f3ce0b78b0aa935}} 
\index{List Functions@{List Functions}!sort\+Stable@{sort\+Stable}}
\index{sort\+Stable@{sort\+Stable}!List Functions@{List Functions}}
\subsubsection{\texorpdfstring{sort\+Stable()}{sortStable()}\hspace{0.1cm}{\footnotesize\ttfamily [3/4]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} Qore\+::sort\+Stable (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}}}]{l,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{func }\end{DoxyParamCaption})}



Performs a stable sort in ascending order and returns the new list; accepts the name of a function to use to sort complex data types or to give a special sort order. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}}, \mbox{\hyperlink{code_flags_DEPRECATED}{D\+E\+P\+R\+E\+C\+A\+T\+ED}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em l} & the list to sort \\
\hline
{\em func} & the name of a function accessible in the current scope that accepts 2 arguments of the data type in the list; the function must return -\/1, 0, or 1 if the first is less than the second, if the first and second are equal, or if the first is greater than the second, respectively\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the sorted list
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__list__functions_ga685a5306bdc7d39d7d0f22f4a39f9cc0}{sort(list, string)}}
\item \mbox{\hyperlink{group__list__functions_gabe7d4c00c333cacb20fffdbd8af8364b}{sort\+\_\+descending(list, string)}}
\item \mbox{\hyperlink{group__list__functions_ga55196b17f01e778d3a49c3c0774d67a2}{sort\+\_\+descending\+\_\+stable(list, string)}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxyRefDesc}{Deprecated}
\item[\mbox{\hyperlink{deprecated__deprecated000035}{Deprecated}}]use \mbox{\hyperlink{group__list__functions_gad03629b1133f3a6b47a2f33792801dbf}{sort\+\_\+stable()}}; camel-\/case function names were deprecated in Qore 0.\+8.\+12 \end{DoxyRefDesc}
\mbox{\Hypertarget{group__list__functions_gabf5874986356a836b4f330b2e9c34fa4}\label{group__list__functions_gabf5874986356a836b4f330b2e9c34fa4}} 
\index{List Functions@{List Functions}!sort\+Stable@{sort\+Stable}}
\index{sort\+Stable@{sort\+Stable}!List Functions@{List Functions}}
\subsubsection{\texorpdfstring{sort\+Stable()}{sortStable()}\hspace{0.1cm}{\footnotesize\ttfamily [4/4]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}} Qore\+::sort\+Stable (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{list}}}]{l,  }\item[{code}]{f }\end{DoxyParamCaption})}



Performs a stable sort in ascending order and returns the new list; accepts a \mbox{\hyperlink{expressions_call_reference}{call reference}} or a \mbox{\hyperlink{expressions_closure}{closure}} to use to sort complex data types or to give a special sort order. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}}, \mbox{\hyperlink{code_flags_DEPRECATED}{D\+E\+P\+R\+E\+C\+A\+T\+ED}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
code sort\_func = int sub (hash l, hash r) \{ \textcolor{keywordflow}{return} l.id <=> r.id; \};
list nl = \mbox{\hyperlink{group__list__functions_ga6202469e6119631474b685952cefe11f}{sortStable}}(l, sort\_func);
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em l} & the list to sort \\
\hline
{\em f} & a \mbox{\hyperlink{expressions_call_reference}{call reference}} or a \mbox{\hyperlink{expressions_closure}{closure}} that accepts 2 arguments of the data type in the list; the code must return -\/1, 0, or 1 if the first is less than the second, if the first and second are equal, or if the first is greater than the second, respectively\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the sorted list
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__list__functions_ga685a5306bdc7d39d7d0f22f4a39f9cc0}{sort(list, string)}}
\item \mbox{\hyperlink{group__list__functions_gabe7d4c00c333cacb20fffdbd8af8364b}{sort\+\_\+descending(list, string)}}
\item \mbox{\hyperlink{group__list__functions_ga55196b17f01e778d3a49c3c0774d67a2}{sort\+\_\+descending\+\_\+stable(list, string)}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxyRefDesc}{Deprecated}
\item[\mbox{\hyperlink{deprecated__deprecated000036}{Deprecated}}]use \mbox{\hyperlink{group__list__functions_gad03629b1133f3a6b47a2f33792801dbf}{sort\+\_\+stable()}}; camel-\/case function names were deprecated in Qore 0.\+8.\+12 \end{DoxyRefDesc}
