-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeleteme.txt
45 lines (31 loc) · 6.61 KB
/
deleteme.txt
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
41
42
43
44
45
(fun n -> if (n < 2) then 1 else (n * fac ((n - 1)))) => (fun n -> if (n < 2) then 1 else (n * fac ((n - 1)))) (5 < 2) => False (5 * fac ((5 - 1))) => 120
-------------------------------------------------------------------------------------------------------------- -------------------------------------------------
2 => 2 3 => 3 fac => fac 5 => 5 if (5 < 2) then 1 else (5 * fac ((5 - 1))) => 120
-------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------
(2 + 3) => 5 fac 5 => 120
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
let tmp0 = (2 + 3) in fac tmp0 => 120
5 => 5 1 => 1 fac 4 => 24 let tmp3 = (5 * 24) in if False then 1 else tmp3 => 120
-------------- -----------------------------------------------------------------------------
5 => 5 2 => 2 (5 - 1) => 4 let tmp2 = fac 4 in let tmp3 = (5 * tmp2) in if False then 1 else tmp3 => 120
---------------- ------------------------------------------------------------------------------------------------------
(5 < 2) => False let tmp1 = (5 - 1) in let tmp2 = fac tmp1 in let tmp3 = (5 * tmp2) in if False then 1 else tmp3 => 120
---------------------------------------------------------------------------------------------------------------------------
let tmp0 = (5 < 2) in let tmp1 = (5 - 1) in let tmp2 = fac tmp1 in let tmp3 = (5 * tmp2) in if tmp0 then 1 else tmp3 => 120
(fun x -> x) => (fun x -> x)
---------------------------------------------------------------------------------------------------------------------------------------
(fun x -> (fun y -> (x + y))) => (fun x -> (fun y -> (x + y))) let tmp0 = id 2 in let tmp1 = add tmp0 in let tmp2 = id 3 in let tmp3 = tmp1 tmp2 in let tmp4 = id 2 in let tmp5 = add tmp4 in id => id 2 => 2 x => 2 (fun x -> x) => (fun x -> x)
------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------------------------------------------
let tmp0 = id 2 in let tmp1 = add tmp0 in let tmp2 = id 3 in let tmp3 = tmp1 tmp2 in let tmp4 = id 2 in add => add let tmp0 = id 2 in let tmp1 = add tmp0 in let tmp2 = id 3 in let tmp3 = tmp1 tmp2 in let tmp4 = id 2 in let tmp5 = add tmp4 in tmp6 => 2 (fun y -> (x + y)) => (fun y -> (x + y)) let tmp0 = id 2 in let tmp1 = add tmp0 in let tmp2 = id 3 in let tmp3 = tmp1 tmp2 in let tmp4 = id 2 in let tmp5 = add tmp4 in let tmp6 = id 2 in id => id 3 => 3 x => 3 x => 2 y => 3
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
let tmp0 = id 2 in let tmp1 = add tmp0 in let tmp2 = id 3 in let tmp3 = tmp1 tmp2 in let tmp4 = id 2 in tmp5 => add (id 2) let tmp0 = id 2 in let tmp1 = add tmp0 in let tmp2 = id 3 in let tmp3 = tmp1 tmp2 in let tmp4 = id 2 in let tmp5 = add tmp4 in let tmp6 = id 2 in tmp7 => 3 let tmp0 = id 2 in let tmp1 = add tmp0 in let tmp2 = id 3 in let tmp3 = tmp1 tmp2 in let tmp4 = id 2 in let tmp5 = add tmp4 in let tmp6 = id 2 in let tmp7 = id 3 in tmp8 => 5
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
let tmp0 = id 2 in let tmp1 = add tmp0 in let tmp2 = id 3 in tmp3 => 5
ghci>
let tmp0 = id 2 : Original
in let tmp1 = id 3 : Original
in let tmp2 = ((tmp0 + tmp1) : Generated)
in let tmp3 = add tmp2 : Generated
in let tmp4 = id 6 : Original
in tmp3 tmp4 => 11
add (id 2 + id 3) (id 6)