\hypertarget{group__list__functions}{}\section{List Functions}
\label{group__list__functions}\index{List Functions@{List Functions}}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
bool \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 \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 \hyperlink{group__list__functions_ga1fa8462e9bb051d40f5e60de8504fc85}{Qore\+::inlist} (auto arg, softlist$<$ auto $>$ l)
\begin{DoxyCompactList}\small\item\em Returns \hyperlink{basic_data_types_True}{True} if the first argument is a member of the second argument list using soft comparisons (with implicit type conversions), \hyperlink{basic_data_types_False}{False} if not. \end{DoxyCompactList}\item 
bool \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 \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 \hyperlink{group__list__functions_ga15056f0f1b38aff845c6ca3dfefd3c54}{Qore\+::inlist\+\_\+hard} (auto arg, softlist$<$ auto $>$ l)
\begin{DoxyCompactList}\small\item\em Returns \hyperlink{basic_data_types_True}{True} if the first argument is a member of the second argument list using hard comparisons (without any implicit type conversions), \hyperlink{basic_data_types_False}{False} if not. \end{DoxyCompactList}\item 
auto \hyperlink{group__list__functions_ga67a04aa765442456f353bf8b38b50e0e}{Qore\+::max} (\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ l)
\begin{DoxyCompactList}\small\item\em Returns the maximum value in a list. \end{DoxyCompactList}\item 
auto \hyperlink{group__list__functions_ga1b2222960f25089fffe260cbc66b3fcb}{Qore\+::max} (\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ l, \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 \hyperlink{group__list__functions_ga3cff204a3ac62a6fd5690805caba38d0}{Qore\+::max} (\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ l, code f)
\begin{DoxyCompactList}\small\item\em Returns the maximum value in a list; accepts a \hyperlink{expressions_call_reference}{call reference} or a \hyperlink{expressions_closure}{closure} to use to compare complex data types or to give a special sort order. \end{DoxyCompactList}\item 
auto \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 \hyperlink{group__list__functions_ga82c657a31963077edb54dd9b54b4683a}{Qore\+::min} (\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ l)
\begin{DoxyCompactList}\small\item\em Returns the minumum value in a list. \end{DoxyCompactList}\item 
auto \hyperlink{group__list__functions_gacb7f83f203b362521f60a2ffeada3658}{Qore\+::min} (\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ l, \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 \hyperlink{group__list__functions_gacdcdbb97650be35e84a44a86ebf1deed}{Qore\+::min} (\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ l, code f)
\begin{DoxyCompactList}\small\item\em Returns the minumum value in a list; accepts a \hyperlink{expressions_call_reference}{call reference} or a \hyperlink{expressions_closure}{closure} to use to compare complex data types or to give a special sort order. \end{DoxyCompactList}\item 
auto \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 
\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ \hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int} $>$ \hyperlink{group__list__functions_gaad3b9056f1b0dfef032d130c7500f517}{Qore\+::range} (\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int} start, \hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int} stop, \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 
\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ \hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int} $>$ \hyperlink{group__list__functions_ga0a2868bf0f1a0537a1781b360e295c32}{Qore\+::range} (\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 \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 
\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ \hyperlink{group__list__functions_ga1037fc3cbc381ea62065db5f4df2f51d}{Qore\+::reverse} (\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ l)
\begin{DoxyCompactList}\small\item\em Reverses a list and returns the new list. \end{DoxyCompactList}\item 
auto \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 
\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ \hyperlink{group__list__functions_ga47a2337ebfed02b24b0276fcd864c257}{Qore\+::sort} (\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ l)
\begin{DoxyCompactList}\small\item\em Performs an unstable sort in ascending order and returns the new list. \end{DoxyCompactList}\item 
\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ \hyperlink{group__list__functions_ga17fdd24f8a26409ee708fd30decf09d9}{Qore\+::sort} (\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ l, \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 
\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ \hyperlink{group__list__functions_ga8a81df22fefa43ece4bbd138dfa00352}{Qore\+::sort} (\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ l, code f)
\begin{DoxyCompactList}\small\item\em Performs an unstable sort in ascending order and returns the new list; accepts a \hyperlink{expressions_call_reference}{call reference} or a \hyperlink{expressions_closure}{closure} to use to sort complex data types or to give a special sort order. \end{DoxyCompactList}\item 
auto \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 
\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ \hyperlink{group__list__functions_ga0e850e8e0ac83cc7ae005793d0b19b4b}{Qore\+::sort\+Descending} (\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ l)
\begin{DoxyCompactList}\small\item\em Performs an unstable sort in descending order and returns the new list. \end{DoxyCompactList}\item 
\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ \hyperlink{group__list__functions_ga9d47df1bc7130a05a639387a2da57eef}{Qore\+::sort\+Descending} (\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ l, \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 
\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ \hyperlink{group__list__functions_ga32a3bc8e108a68a446576bd41153867e}{Qore\+::sort\+Descending} (\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ l, code f)
\begin{DoxyCompactList}\small\item\em Performs an unstable sort in descending order and returns the new list; accepts a \hyperlink{expressions_call_reference}{call reference} or a \hyperlink{expressions_closure}{closure} to use to sort complex data types or to give a special sort order. \end{DoxyCompactList}\item 
auto \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 
\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ \hyperlink{group__list__functions_ga415240173a996207ae4035180d483302}{Qore\+::sort\+Descending\+Stable} (\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ l)
\begin{DoxyCompactList}\small\item\em Performs a stable sort in descending order and returns the new list. \end{DoxyCompactList}\item 
\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ \hyperlink{group__list__functions_gaded14ed4d79c701b6334f3b546e8b0c1}{Qore\+::sort\+Descending\+Stable} (\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ l, \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 
\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ \hyperlink{group__list__functions_ga5dbba6070645afe493e434b882c9a7b8}{Qore\+::sort\+Descending\+Stable} (\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ l, code f)
\begin{DoxyCompactList}\small\item\em Performs a stable sort in descending order and returns the new list; accepts a \hyperlink{expressions_call_reference}{call reference} or a \hyperlink{expressions_closure}{closure} to use to sort complex data types or to give a special sort order. \end{DoxyCompactList}\item 
auto \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 
\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ \hyperlink{group__list__functions_ga2e0fed0e37b3dc28367144b9ebcf635f}{Qore\+::sort\+Stable} (\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ l)
\begin{DoxyCompactList}\small\item\em Performs a stable sort in ascending order and returns the new list. \end{DoxyCompactList}\item 
\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ \hyperlink{group__list__functions_ga98f4d58ff2aac802955588fab5e2e066}{Qore\+::sort\+Stable} (\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ l, \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 
\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ \hyperlink{group__list__functions_ga3cd34fa7d9cc132e33346c439847f09c}{Qore\+::sort\+Stable} (\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ l, code f)
\begin{DoxyCompactList}\small\item\em Performs a stable sort in ascending order and returns the new list; accepts a \hyperlink{expressions_call_reference}{call reference} or a \hyperlink{expressions_closure}{closure} to use to sort complex data types or to give a special sort order. \end{DoxyCompactList}\item 
auto \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 
\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ \hyperlink{group__list__functions_ga7723a6dddb88dfe0030ad9f31b9d34e9}{Qore\+::sort\+\_\+descending} (\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ l)
\begin{DoxyCompactList}\small\item\em Performs an unstable sort in descending order and returns the new list. \end{DoxyCompactList}\item 
\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ \hyperlink{group__list__functions_ga583d25dcb4d67f0e371c9565ba478374}{Qore\+::sort\+\_\+descending} (\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ l, \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 
\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ \hyperlink{group__list__functions_ga1d94ff15f5242ca057de7ee9ce06fac9}{Qore\+::sort\+\_\+descending} (\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ l, code f)
\begin{DoxyCompactList}\small\item\em Performs an unstable sort in descending order and returns the new list; accepts a \hyperlink{expressions_call_reference}{call reference} or a \hyperlink{expressions_closure}{closure} to use to sort complex data types or to give a special sort order. \end{DoxyCompactList}\item 
auto \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 
\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ \hyperlink{group__list__functions_gaf7a7db7c47fc6004b92dd7737fffc35f}{Qore\+::sort\+\_\+descending\+\_\+stable} (\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ l)
\begin{DoxyCompactList}\small\item\em Performs a stable sort in descending order and returns the new list. \end{DoxyCompactList}\item 
\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ \hyperlink{group__list__functions_ga4980f1bb2124440bff2cc8de1f7b69ee}{Qore\+::sort\+\_\+descending\+\_\+stable} (\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ l, \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 
\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ \hyperlink{group__list__functions_ga57ddb784b376665d9916520e32a13a1b}{Qore\+::sort\+\_\+descending\+\_\+stable} (\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ l, code f)
\begin{DoxyCompactList}\small\item\em Performs a stable sort in descending order and returns the new list; accepts a \hyperlink{expressions_call_reference}{call reference} or a \hyperlink{expressions_closure}{closure} to use to sort complex data types or to give a special sort order. \end{DoxyCompactList}\item 
auto \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 
\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ \hyperlink{group__list__functions_ga5b93d01602008e0bae869f722f4526ba}{Qore\+::sort\+\_\+stable} (\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ l)
\begin{DoxyCompactList}\small\item\em Performs a stable sort in ascending order and returns the new list. \end{DoxyCompactList}\item 
\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ \hyperlink{group__list__functions_gaae73dd966de64cf667baebdc3d09ea2f}{Qore\+::sort\+\_\+stable} (\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ l, \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 
\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ \hyperlink{group__list__functions_ga7df296aeb26ca8795ca26fcac57c1a7c}{Qore\+::sort\+\_\+stable} (\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$ l, code f)
\begin{DoxyCompactList}\small\item\em Performs a stable sort in ascending order and returns the new list; accepts a \hyperlink{expressions_call_reference}{call reference} or a \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\+:}
\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\+:}
\hyperlink{code_flags_NOOP}{N\+O\+OP} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__list__functions_ga1fa8462e9bb051d40f5e60de8504fc85}\label{group__list__functions_ga1fa8462e9bb051d40f5e60de8504fc85}} 
\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$<$ auto $>$}]{l }\end{DoxyParamCaption})}



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

\begin{DoxyParagraph}{Code Flags\+:}
\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} (\hyperlink{group__list__functions_ga776993c1408e78f466e9b11aff7ecc46}{inlist}(str, strlist))
    \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}
\hyperlink{basic_data_types_True}{True} if the first argument is a member of the second argument list using soft comparisons (with implicit type conversions), \hyperlink{basic_data_types_False}{False} if not
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__list__functions_ga15056f0f1b38aff845c6ca3dfefd3c54}{inlist\+\_\+hard(auto, softlist$<$auto$>$)} 
\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\+:}
\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\+:}
\hyperlink{code_flags_NOOP}{N\+O\+OP} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__list__functions_ga15056f0f1b38aff845c6ca3dfefd3c54}\label{group__list__functions_ga15056f0f1b38aff845c6ca3dfefd3c54}} 
\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$<$ auto $>$}]{l }\end{DoxyParamCaption})}



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

\begin{DoxyParagraph}{Code Flags\+:}
\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} (\hyperlink{group__list__functions_ga1fdf41e61754093da9f8a3b40e2a9cea}{inlist\_hard}(str, strlist))
    \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}
\hyperlink{basic_data_types_True}{True} if the first argument is a member of the second argument list using hard comparisons (without any implicit type conversions), \hyperlink{basic_data_types_False}{False} if not
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__list__functions_ga1fa8462e9bb051d40f5e60de8504fc85}{inlist(auto, softlist$<$auto$>$)} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__list__functions_ga67a04aa765442456f353bf8b38b50e0e}\label{group__list__functions_ga67a04aa765442456f353bf8b38b50e0e}} 
\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[{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$}]{l }\end{DoxyParamCaption})}



Returns the maximum value in a list. 

This variant will only work on basic data types

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

\begin{DoxyCode}
auto v = \hyperlink{group__list__functions_ga67a04aa765442456f353bf8b38b50e0e}{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}
min(list) 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__list__functions_ga1b2222960f25089fffe260cbc66b3fcb}\label{group__list__functions_ga1b2222960f25089fffe260cbc66b3fcb}} 
\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[{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$}]{l,  }\item[{\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\+:}
\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 = \hyperlink{group__list__functions_ga67a04aa765442456f353bf8b38b50e0e}{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}
min(list, string) 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__list__functions_ga3cff204a3ac62a6fd5690805caba38d0}\label{group__list__functions_ga3cff204a3ac62a6fd5690805caba38d0}} 
\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[{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$}]{l,  }\item[{code}]{f }\end{DoxyParamCaption})}



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

\begin{DoxyParagraph}{Code Flags\+:}
\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 = \hyperlink{group__list__functions_ga67a04aa765442456f353bf8b38b50e0e}{max}(l, sort\_func);
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em l} & the list to sort \\
\hline
{\em f} & a \hyperlink{expressions_call_reference}{call reference} or a \hyperlink{expressions_closure}{closure} that accepts 2 arguments of the data type in the list; the \hyperlink{expressions_call_reference}{call reference} or a \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}
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\+:}
\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
auto v = \hyperlink{group__list__functions_ga67a04aa765442456f353bf8b38b50e0e}{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}
\hyperlink{group__list__functions_ga82c657a31963077edb54dd9b54b4683a}{min}(...) 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__list__functions_ga82c657a31963077edb54dd9b54b4683a}\label{group__list__functions_ga82c657a31963077edb54dd9b54b4683a}} 
\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[{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$}]{l }\end{DoxyParamCaption})}



Returns the minumum value in a list. 

This variant will only work on basic data types

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

\begin{DoxyCode}
auto v = \hyperlink{group__list__functions_ga82c657a31963077edb54dd9b54b4683a}{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}
max(list) 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__list__functions_gacb7f83f203b362521f60a2ffeada3658}\label{group__list__functions_gacb7f83f203b362521f60a2ffeada3658}} 
\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[{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$}]{l,  }\item[{\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\+:}
\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 = \hyperlink{group__list__functions_ga82c657a31963077edb54dd9b54b4683a}{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}
max(list, string) 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__list__functions_gacdcdbb97650be35e84a44a86ebf1deed}\label{group__list__functions_gacdcdbb97650be35e84a44a86ebf1deed}} 
\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[{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$}]{l,  }\item[{code}]{f }\end{DoxyParamCaption})}



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

\begin{DoxyParagraph}{Code Flags\+:}
\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 = \hyperlink{group__list__functions_ga82c657a31963077edb54dd9b54b4683a}{min}(l, sort\_func);
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em l} & the list to sort \\
\hline
{\em f} & a \hyperlink{expressions_call_reference}{call reference} or a \hyperlink{expressions_closure}{closure} that accepts 2 arguments of the data type in the list; the \hyperlink{expressions_call_reference}{call reference} or a \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}
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\+:}
\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
auto v = \hyperlink{group__list__functions_ga82c657a31963077edb54dd9b54b4683a}{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}
\hyperlink{group__list__functions_ga67a04aa765442456f353bf8b38b50e0e}{max}(...) 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__list__functions_gaad3b9056f1b0dfef032d130c7500f517}\label{group__list__functions_gaad3b9056f1b0dfef032d130c7500f517}} 
\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 \hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}$>$ Qore\+::range (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}]{start,  }\item[{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}]{stop,  }\item[{\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\+:}
\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
\hyperlink{group__list__functions_gaad3b9056f1b0dfef032d130c7500f517}{range}(2, 5); \textcolor{comment}{# (2, 3, 4, 5)}
\hyperlink{group__list__functions_gaad3b9056f1b0dfef032d130c7500f517}{range}(2, -2); \textcolor{comment}{# (2, 1, 0, -1, -2)}
\hyperlink{group__list__functions_gaad3b9056f1b0dfef032d130c7500f517}{range}(1, 10, 5); \textcolor{comment}{# (1, 6)}
\hyperlink{group__list__functions_gaad3b9056f1b0dfef032d130c7500f517}{range}(0, 10, 5); \textcolor{comment}{# (0, 5, 10)}
\hyperlink{group__list__functions_gaad3b9056f1b0dfef032d130c7500f517}{range}(-10, 10, 5); \textcolor{comment}{# (-10, -5, 0, 5, 10)}
\hyperlink{group__list__functions_gaad3b9056f1b0dfef032d130c7500f517}{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}
\hyperlink{group__range__functions_gad5b4d3ad3f6c36d2e714bc6ed757a507}{xrange}
\end{DoxySeeAlso}
\begin{DoxyNote}{Note}
the main difference between \hyperlink{group__list__functions_gaad3b9056f1b0dfef032d130c7500f517}{range()} and \hyperlink{group__range__functions_gad5b4d3ad3f6c36d2e714bc6ed757a507}{xrange()} is that range returns real list and xrange returns a \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_ga0a2868bf0f1a0537a1781b360e295c32}\label{group__list__functions_ga0a2868bf0f1a0537a1781b360e295c32}} 
\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 \hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}$>$ Qore\+::range (\begin{DoxyParamCaption}\item[{\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 \hyperlink{group__list__functions_gaad3b9056f1b0dfef032d130c7500f517}{range(int, int, int)} meaning {\ttfamily range}(0, {\ttfamily stop}, 1)

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

\begin{DoxyCode}
\hyperlink{group__list__functions_gaad3b9056f1b0dfef032d130c7500f517}{range}(1); \textcolor{comment}{# (0, 1)}
\hyperlink{group__list__functions_gaad3b9056f1b0dfef032d130c7500f517}{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}
\hyperlink{group__range__functions_gad5b4d3ad3f6c36d2e714bc6ed757a507}{xrange}
\end{DoxySeeAlso}
\begin{DoxyNote}{Note}
the main difference between \hyperlink{group__list__functions_gaad3b9056f1b0dfef032d130c7500f517}{range()} and \hyperlink{group__range__functions_gad5b4d3ad3f6c36d2e714bc6ed757a507}{xrange()} is that range returns real list and xrange returns a \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\+:}
\hyperlink{code_flags_NOOP}{N\+O\+OP} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__list__functions_ga1037fc3cbc381ea62065db5f4df2f51d}\label{group__list__functions_ga1037fc3cbc381ea62065db5f4df2f51d}} 
\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 \hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$auto$>$ Qore\+::reverse (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$}]{l }\end{DoxyParamCaption})}



Reverses a list and returns the new list. 

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

\begin{DoxyCode}
list<auto> nl = \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\+:}
\hyperlink{code_flags_NOOP}{N\+O\+OP} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__list__functions_ga47a2337ebfed02b24b0276fcd864c257}\label{group__list__functions_ga47a2337ebfed02b24b0276fcd864c257}} 
\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 \hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$auto$>$ Qore\+::sort (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$}]{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\+:}
\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
list<auto> nl = \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 sort\+Stable(list)
\item sort\+Descending\+Stable(list)
\item sort\+Descending(list) 
\end{DoxyItemize}
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__list__functions_ga17fdd24f8a26409ee708fd30decf09d9}\label{group__list__functions_ga17fdd24f8a26409ee708fd30decf09d9}} 
\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 \hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$auto$>$ Qore\+::sort (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$}]{l,  }\item[{\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\+:}
\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<auto> nl = \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 sort\+Stable(list, string)
\item sort\+Descending\+Stable(list, string)
\item sort\+Descending(list, string) 
\end{DoxyItemize}
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__list__functions_ga8a81df22fefa43ece4bbd138dfa00352}\label{group__list__functions_ga8a81df22fefa43ece4bbd138dfa00352}} 
\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 \hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$auto$>$ Qore\+::sort (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$}]{l,  }\item[{code}]{f }\end{DoxyParamCaption})}



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

\begin{DoxyParagraph}{Code Flags\+:}
\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<auto> nl = \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 \hyperlink{expressions_call_reference}{call reference} or a \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 sort\+Stable(list, code)
\item sort\+Descending\+Stable(list, code)
\item 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\+:}
\hyperlink{code_flags_NOOP}{N\+O\+OP} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__list__functions_ga7723a6dddb88dfe0030ad9f31b9d34e9}\label{group__list__functions_ga7723a6dddb88dfe0030ad9f31b9d34e9}} 
\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 \hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$auto$>$ Qore\+::sort\+\_\+descending (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$}]{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\+:}
\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
list<auto> nl = \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 sort(list)
\item sort\+Descending\+Stable(list)
\item sort\+Stable(list)
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+12 as a replacement for deprecated camel-\/case \hyperlink{group__list__functions_gad9e205ca0a43f52a1388611b54521c19}{sort\+Descending()} 
\end{DoxySince}
\mbox{\Hypertarget{group__list__functions_ga583d25dcb4d67f0e371c9565ba478374}\label{group__list__functions_ga583d25dcb4d67f0e371c9565ba478374}} 
\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 \hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$auto$>$ Qore\+::sort\+\_\+descending (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$}]{l,  }\item[{\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\+:}
\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
list<auto> nl = \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 sort\+\_\+stable(list, string)
\item sort\+\_\+descending\+Stable(list, string)
\item sort(list, string)
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+12 as a replacement for deprecated camel-\/case \hyperlink{group__list__functions_gad9e205ca0a43f52a1388611b54521c19}{sort\+Descending()} 
\end{DoxySince}
\mbox{\Hypertarget{group__list__functions_ga1d94ff15f5242ca057de7ee9ce06fac9}\label{group__list__functions_ga1d94ff15f5242ca057de7ee9ce06fac9}} 
\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 \hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$auto$>$ Qore\+::sort\+\_\+descending (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$}]{l,  }\item[{code}]{f }\end{DoxyParamCaption})}



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

\begin{DoxyParagraph}{Code Flags\+:}
\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<auto> nl = \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 \hyperlink{expressions_call_reference}{call reference} or a \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 sort\+\_\+stable(list, code)
\item sort\+\_\+descending\+Stable(list, code)
\item sort(list, code)
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+12 as a replacement for deprecated camel-\/case \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\+:}
\hyperlink{code_flags_NOOP}{N\+O\+OP} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__list__functions_gaf7a7db7c47fc6004b92dd7737fffc35f}\label{group__list__functions_gaf7a7db7c47fc6004b92dd7737fffc35f}} 
\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 \hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$auto$>$ Qore\+::sort\+\_\+descending\+\_\+stable (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$}]{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\+:}
\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
list<auto> nl = \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 sort\+\_\+stable(list, code)
\item sort\+\_\+descending\+\_\+stable(list, code)
\item sort(list, code)
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+12 as a replacement for deprecated camel-\/case \hyperlink{group__list__functions_gacd07eea87f385a0bb8764a9fa5b47075}{sort\+Descending\+Stable()} 
\end{DoxySince}
\mbox{\Hypertarget{group__list__functions_ga4980f1bb2124440bff2cc8de1f7b69ee}\label{group__list__functions_ga4980f1bb2124440bff2cc8de1f7b69ee}} 
\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 \hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$auto$>$ Qore\+::sort\+\_\+descending\+\_\+stable (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$}]{l,  }\item[{\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\+:}
\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<auto> nl = \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 sort\+\_\+stable(list, code)
\item sort\+\_\+descending\+\_\+stable(list, code)
\item sort(list, code)
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+12 as a replacement for deprecated camel-\/case \hyperlink{group__list__functions_gacd07eea87f385a0bb8764a9fa5b47075}{sort\+Descending\+Stable()} 
\end{DoxySince}
\mbox{\Hypertarget{group__list__functions_ga57ddb784b376665d9916520e32a13a1b}\label{group__list__functions_ga57ddb784b376665d9916520e32a13a1b}} 
\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 \hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$auto$>$ Qore\+::sort\+\_\+descending\+\_\+stable (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$}]{l,  }\item[{code}]{f }\end{DoxyParamCaption})}



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

\begin{DoxyParagraph}{Code Flags\+:}
\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<auto> nl = \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 \hyperlink{expressions_call_reference}{call reference} or a \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 sort\+\_\+stable(list, code)
\item sort\+\_\+descending\+\_\+stable(list, code)
\item sort(list, code)
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+12 as a replacement for deprecated camel-\/case \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\+:}
\hyperlink{code_flags_NOOP}{N\+O\+OP} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__list__functions_ga5b93d01602008e0bae869f722f4526ba}\label{group__list__functions_ga5b93d01602008e0bae869f722f4526ba}} 
\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 \hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$auto$>$ Qore\+::sort\+\_\+stable (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$}]{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\+:}
\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
list<auto> nl = \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 sort(list, string)
\item sort\+\_\+descending(list, string)
\item sort\+\_\+descending\+\_\+stable(list, string)
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+12 as a replacement for deprecated camel-\/case \hyperlink{group__list__functions_ga6202469e6119631474b685952cefe11f}{sort\+Stable()} 
\end{DoxySince}
\mbox{\Hypertarget{group__list__functions_gaae73dd966de64cf667baebdc3d09ea2f}\label{group__list__functions_gaae73dd966de64cf667baebdc3d09ea2f}} 
\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 \hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$auto$>$ Qore\+::sort\+\_\+stable (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$}]{l,  }\item[{\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\+:}
\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<auto> nl = \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 sort(list, string)
\item sort\+\_\+descending(list, string)
\item sort\+\_\+descending\+\_\+stable(list, string)
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+12 as a replacement for deprecated camel-\/case \hyperlink{group__list__functions_ga6202469e6119631474b685952cefe11f}{sort\+Stable()} 
\end{DoxySince}
\mbox{\Hypertarget{group__list__functions_ga7df296aeb26ca8795ca26fcac57c1a7c}\label{group__list__functions_ga7df296aeb26ca8795ca26fcac57c1a7c}} 
\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 \hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$auto$>$ Qore\+::sort\+\_\+stable (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$}]{l,  }\item[{code}]{f }\end{DoxyParamCaption})}



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

\begin{DoxyParagraph}{Code Flags\+:}
\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<auto> l, hash<auto> r) \{ \textcolor{keywordflow}{return} l.id <=> r.id; \};
list<auto> nl = \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 \hyperlink{expressions_call_reference}{call reference} or a \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 sort(list, string)
\item sort\+\_\+descending(list, string)
\item sort\+\_\+descending\+\_\+stable(list, string)
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+12 as a replacement for deprecated camel-\/case \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\+:}
\hyperlink{code_flags_NOOP}{N\+O\+OP}, \hyperlink{code_flags_DEPRECATED}{D\+E\+P\+R\+E\+C\+A\+T\+ED} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__list__functions_ga0e850e8e0ac83cc7ae005793d0b19b4b}\label{group__list__functions_ga0e850e8e0ac83cc7ae005793d0b19b4b}} 
\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 \hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$auto$>$ Qore\+::sort\+Descending (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$}]{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\+:}
\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}, \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 sort(list)
\item sort\+Descending\+Stable(list)
\item sort\+Stable(list)
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxyRefDesc}{Deprecated}
\item[\hyperlink{deprecated__deprecated000028}{Deprecated}]use \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_ga9d47df1bc7130a05a639387a2da57eef}\label{group__list__functions_ga9d47df1bc7130a05a639387a2da57eef}} 
\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 \hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$auto$>$ Qore\+::sort\+Descending (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$}]{l,  }\item[{\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\+:}
\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}, \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 sort\+Stable(list, string)
\item sort\+Descending\+Stable(list, string)
\item sort(list, string)
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxyRefDesc}{Deprecated}
\item[\hyperlink{deprecated__deprecated000029}{Deprecated}]use \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_ga32a3bc8e108a68a446576bd41153867e}\label{group__list__functions_ga32a3bc8e108a68a446576bd41153867e}} 
\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 \hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$auto$>$ Qore\+::sort\+Descending (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$}]{l,  }\item[{code}]{f }\end{DoxyParamCaption})}



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

\begin{DoxyParagraph}{Code Flags\+:}
\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}, \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 \hyperlink{expressions_call_reference}{call reference} or a \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 sort\+Stable(list, code)
\item sort\+Descending\+Stable(list, code)
\item sort(list, code)
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxyRefDesc}{Deprecated}
\item[\hyperlink{deprecated__deprecated000030}{Deprecated}]use \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\+:}
\hyperlink{code_flags_NOOP}{N\+O\+OP}, \hyperlink{code_flags_DEPRECATED}{D\+E\+P\+R\+E\+C\+A\+T\+ED} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__list__functions_ga415240173a996207ae4035180d483302}\label{group__list__functions_ga415240173a996207ae4035180d483302}} 
\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 \hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$auto$>$ Qore\+::sort\+Descending\+Stable (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$}]{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\+:}
\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}, \hyperlink{code_flags_DEPRECATED}{D\+E\+P\+R\+E\+C\+A\+T\+ED}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
list<auto> nl = \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 sort\+\_\+stable(list, code)
\item sort\+\_\+descending\+\_\+stable(list, code)
\item sort(list, code)
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxyRefDesc}{Deprecated}
\item[\hyperlink{deprecated__deprecated000031}{Deprecated}]use \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_gaded14ed4d79c701b6334f3b546e8b0c1}\label{group__list__functions_gaded14ed4d79c701b6334f3b546e8b0c1}} 
\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 \hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$auto$>$ Qore\+::sort\+Descending\+Stable (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$}]{l,  }\item[{\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\+:}
\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}, \hyperlink{code_flags_DEPRECATED}{D\+E\+P\+R\+E\+C\+A\+T\+ED}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
list<auto> nl = \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 sort\+\_\+stable(list, code)
\item sort\+\_\+descending\+\_\+stable(list, code)
\item sort(list, code)
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxyRefDesc}{Deprecated}
\item[\hyperlink{deprecated__deprecated000032}{Deprecated}]use \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_ga5dbba6070645afe493e434b882c9a7b8}\label{group__list__functions_ga5dbba6070645afe493e434b882c9a7b8}} 
\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 \hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$auto$>$ Qore\+::sort\+Descending\+Stable (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$}]{l,  }\item[{code}]{f }\end{DoxyParamCaption})}



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

\begin{DoxyParagraph}{Code Flags\+:}
\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}, \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<auto> nl = \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 \hyperlink{expressions_call_reference}{call reference} or a \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 sort\+\_\+stable(list, code)
\item sort\+\_\+descending\+\_\+stable(list, code)
\item sort(list, code)
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxyRefDesc}{Deprecated}
\item[\hyperlink{deprecated__deprecated000033}{Deprecated}]use \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\+:}
\hyperlink{code_flags_NOOP}{N\+O\+OP}, \hyperlink{code_flags_DEPRECATED}{D\+E\+P\+R\+E\+C\+A\+T\+ED} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__list__functions_ga2e0fed0e37b3dc28367144b9ebcf635f}\label{group__list__functions_ga2e0fed0e37b3dc28367144b9ebcf635f}} 
\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 \hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$auto$>$ Qore\+::sort\+Stable (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$}]{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\+:}
\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}, \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 sort(list, string)
\item sort\+\_\+descending(list, string)
\item sort\+\_\+descending\+\_\+stable(list, string)
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxyRefDesc}{Deprecated}
\item[\hyperlink{deprecated__deprecated000034}{Deprecated}]use \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_ga98f4d58ff2aac802955588fab5e2e066}\label{group__list__functions_ga98f4d58ff2aac802955588fab5e2e066}} 
\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 \hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$auto$>$ Qore\+::sort\+Stable (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$}]{l,  }\item[{\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\+:}
\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}, \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 sort(list, string)
\item sort\+\_\+descending(list, string)
\item sort\+\_\+descending\+\_\+stable(list, string)
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxyRefDesc}{Deprecated}
\item[\hyperlink{deprecated__deprecated000035}{Deprecated}]use \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_ga3cd34fa7d9cc132e33346c439847f09c}\label{group__list__functions_ga3cd34fa7d9cc132e33346c439847f09c}} 
\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 \hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$auto$>$ Qore\+::sort\+Stable (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ auto $>$}]{l,  }\item[{code}]{f }\end{DoxyParamCaption})}



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

\begin{DoxyParagraph}{Code Flags\+:}
\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}, \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<auto> nl = \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 \hyperlink{expressions_call_reference}{call reference} or a \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 sort(list, string)
\item sort\+\_\+descending(list, string)
\item sort\+\_\+descending\+\_\+stable(list, string)
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxyRefDesc}{Deprecated}
\item[\hyperlink{deprecated__deprecated000036}{Deprecated}]use \hyperlink{group__list__functions_gad03629b1133f3a6b47a2f33792801dbf}{sort\+\_\+stable()}; camel-\/case function names were deprecated in Qore 0.\+8.\+12 \end{DoxyRefDesc}
