File: append.tex

package info (click to toggle)
sollya 7.0%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 13,864 kB
  • sloc: ansic: 117,441; yacc: 8,822; lex: 2,419; makefile: 870; cpp: 76
file content (40 lines) | stat: -rw-r--r-- 1,271 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
\subsection{:.}
\label{labappend}
\noindent Name: \textbf{:.}\\
\phantom{aaa}add an element at the end of a list.\\[0.2cm]
\noindent Library name:\\
\verb|   sollya_obj_t sollya_lib_append(sollya_obj_t, sollya_obj_t)|\\[0.2cm]
\noindent Usage: 
\begin{center}
\emph{L}\textbf{:.}\emph{x} : (\textsf{list}, \textsf{any type}) $\rightarrow$ \textsf{list}\\
\end{center}
Parameters: 
\begin{itemize}
\item \emph{L} is a list (possibly empty).
\item \emph{x} is an object of any type.
\end{itemize}
\noindent Description: \begin{itemize}

\item \textbf{:.} adds the element \emph{x} at the end of the list \emph{L}.

\item Note that since \emph{x} may be of any type, it can in particular be a list.
\end{itemize}
\noindent Example 1: 
\begin{center}\begin{minipage}{15cm}\begin{Verbatim}[frame=single]
> [|2,3,4|]:.5;
[|2, 3, 4, 5|]
\end{Verbatim}
\end{minipage}\end{center}
\noindent Example 2: 
\begin{center}\begin{minipage}{15cm}\begin{Verbatim}[frame=single]
> [|1,2,3|]:.[|4,5,6|];
[|1, 2, 3, [|4, 5, 6|]|]
\end{Verbatim}
\end{minipage}\end{center}
\noindent Example 3: 
\begin{center}\begin{minipage}{15cm}\begin{Verbatim}[frame=single]
> [||]:.1;
[|1|]
\end{Verbatim}
\end{minipage}\end{center}
See also: \textbf{.:} (\ref{labprepend}), \textbf{@} (\ref{labconcat})