File tree Expand file tree Collapse file tree 1 file changed +22
-3
lines changed Expand file tree Collapse file tree 1 file changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -35,17 +35,36 @@ module Expr =
3535 let ``2 - layers quotation combination`` evaluator =
3636 let expr =
3737 <@ 4 + 5 @>
38+ >>= ( fun x ->
39+ let a = x + 10
40+ <@ ( a, a* a) @>
41+ >>= fun ( x , y ) ->
42+ <@ ([ x + y], x, y, [| x; y|]) @>)
43+ let res = Expr.run evaluator expr
44+
45+ areEqual ([ 380 ], 19 , 361 , [| 19 ; 361 |]) res
46+
47+ [<Test>]
48+ let ``2 - layers quotation combination [ Unquote ] `` () = `` 2-layers quotation combination `` unquote
49+
50+ [<Test>]
51+ let ``2 - layers quotation combination [ PowerPack ] `` () = `` 2-layers quotation combination `` powerpack
52+
53+
54+ let ``2 - layers quot comb associative`` evaluator =
55+ let expr =
56+ (<@ 4 + 5 @>
3857 >>= fun x ->
3958 let a = x + 10
40- <@ ( a, a* a) @>
59+ <@ ( a, a* a) @>)
4160 >>= fun ( x , y ) ->
4261 <@ ([ x + y], x, y, [| x; y|]) @>
4362 let res = Expr.run evaluator expr
4463
4564 areEqual ([ 380 ], 19 , 361 , [| 19 ; 361 |]) res
4665
4766 [<Test>]
48- let ``2 - layers quotation combination [ Unquote ] `` () = `` 2-layers quotation combination `` unquote
67+ let ``2 - layers quot comb associative [ Unquote ] `` () = `` 2-layers quot comb associative `` unquote
4968
5069 [<Test>]
51- let ``2 - layers quotation combination [ PowerPack ] `` () = `` 2-layers quotation combination `` powerpack
70+ let ``2 - layers quot comb associative [ PowerPack ] `` () = `` 2-layers quot comb associative `` powerpack
You can’t perform that action at this time.
0 commit comments