File: introExample54.tex

package info (click to toggle)
sollya 8.0%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 17,592 kB
  • sloc: ansic: 124,655; yacc: 7,543; lex: 2,440; makefile: 888; cpp: 77
file content (34 lines) | stat: -rw-r--r-- 942 bytes parent folder | download | duplicates (2)
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{center}\begin{minipage}{15cm}\begin{Verbatim}[frame=single]
> autosimplify = off!;
> match 5 + 1 with 
      1 + 5 : ("One plus five")
      6     : ("Six")
      5 + 1 : ("Five plus one");
Five plus one
> 
> match 6 with 
      1 + 5 : ("One plus five")
      6     : ("Six")
      5 + 1 : ("Five plus one");
Six
>   
> match 1 + 5 with 
      1 + 5 : ("One plus five")
      6     : ("Six")
      5 + 1 : ("Five plus one");
One plus five
> 
> match [1; 5 + 1] with
      [1; 1 + 5] : ("Interval from one to one plus five")
      [1; 6]     : ("Interval from one to six")
      [1; 5 + 1] : ("Interval from one to five plus one");
Interval from one to one plus five
> 
> match [1; 6] with
      [1; 1 + 5] : ("Interval from one to one plus five")
      [1; 6]     : ("Interval from one to six")
      [1; 5 + 1] : ("Interval from one to five plus one");
Interval from one to one plus five
> 
\end{Verbatim}
\end{minipage}\end{center}