File: introExample58.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 (32 lines) | stat: -rw-r--r-- 919 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
\begin{center}\begin{minipage}{15cm}\begin{Verbatim}[frame=single]
> match [| exp(sin(x)), sin(x), 4, DE(x), 9... |] with
        exp(a) .: (a .: (([||] :. 4) @ (b @ [| 13... |]))) : 
                           { "a = ", a, ", b = ", b; };
a = sin(x), b = [|doubleextended(x), 9, 10, 11, 12|]
> 
> match [| 1, 2, 3, 4, D... |] with 
        a @ [| 4, D...|] : (a);
[|1, 2, 3|]
> 
> match [| 1, 2, 3, 4, D... |] with 
        a @ [| D...|] : (a);
[|1, 2, 3, 4|]
> 
> match [| 1, 2, 3, 4... |] with 
        a @ [| 3...|] : (a);
[|1, 2|]
> 
> match [| 1, 2, 3, 4... |] with 
        a @ [| 4...|] : (a);
[|1, 2, 3|]
> 
> match [| 1, 2, 3, 4... |] with 
        a @ [| 17...|] : (a);
[|1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16|]
> 
> match [| 1, 2, 3, 4... |] with 
        a @ [| 17, 18, 19 |] : (a)
        default              : ("Something else");
Something else
\end{Verbatim}
\end{minipage}\end{center}