-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchap-2.3-forlan5.tex
34 lines (34 loc) · 1013 Bytes
/
chap-2.3-forlan5.tex
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
\begin{list}{}
{\setlength{\leftmargin}{\leftmargini}
\setlength{\rightmargin}{0cm}
\setlength{\itemindent}{0cm}
\setlength{\listparindent}{0cm}
\setlength{\itemsep}{0cm}
\setlength{\parsep}{0cm}
\setlength{\labelsep}{0cm}
\setlength{\labelwidth}{0cm}
\catcode`\#=12
\catcode`\$=12
\catcode`\%=12
\catcode`\^=12
\catcode`\_=12
\catcode`\.=12
\catcode`\?=12
\catcode`\!=12
\catcode`\&=12
\ttfamily}
\small
\item[]\textsl{-\ }fun\ f\ n\ =\ n\ \symbol{'052}\ 2;
\item[]\textsl{val\ f\ =\ fn\ :\ int\ ->\ int}
\item[]\textsl{-\ }f\ 3;
\item[]\textsl{val\ it\ =\ 6\ :\ int}
\item[]\textsl{-\ }f(4\ +\ 5);
\item[]\textsl{val\ it\ =\ 18\ :\ int}
\item[]\textsl{-\ }f\ 4\ +\ 5;
\item[]\textsl{val\ it\ =\ 13\ :\ int}
\item[]\textsl{-\ }fun\ g(x,\ y)\ =\ (x\ ^\ y,\ y\ ^\ x);
\item[]\textsl{val\ g\ =\ fn\ :\ string\ \symbol{'052}\ string\ ->\ string\ \symbol{'052}\ string}
\item[]\textsl{-\ }val\ (u,\ v)\ =\ g("a",\ "b");
\item[]\textsl{val\ u\ =\ "ab"\ :\ string}
\item[]\textsl{val\ v\ =\ "ba"\ :\ string}
\end{list}