Differences

This shows you the differences between two versions of the page.

lp-a2 [2018/04/08 09:18]
mvc
lp-a2 [2018/04/08 09:21] (current)
mvc
Line 319: Line 319:
> (require "a10.rkt") > (require "a10.rkt")
-> (run 1 (q) (lengtho '() q))+> (run 1 q (lengtho '() q))
(()) (())
-> (run 1 (q) (lengtho '(a b) q))+> (run 1 q (lengtho '(a b) q))
((0 1)) ((0 1))
-> (run 1 (q) (lengtho '(a b c) q))+> (run 1 q (lengtho '(a b c) q))
((1 1)) ((1 1))
-> (run 1 (q) (lengtho '(a b c d e f g) q))+> (run 1 q (lengtho '(a b c d e f g) q))
((1 1 1)) ((1 1 1))
-> (run 1 (q) (lengtho q (build-num 0)))+> (run 1 q (lengtho q (build-num 0)))
(()) (())
-> (run 1 (q) (lengtho q (build-num 5))) +> (run 1 q (lengtho q (build-num 5))) 
-((_.0 _.1 _.2 _.3 _.4))+((_0 _1 _2 _3 _4))
-> (run 10 (q) (fresh (x y) (lengtho x y) (== `(,x ,y) q))) +> (run 10 q (fresh (x y) (lengtho x y) (== `(,x ,y) q))) 
-((() ()) ((_.0) (1)) ((_.0 _.1) (0 1)) ((_.0 _.1 _.2) (1 1)) +((() ()) 
- ((_.0 _.1 _.2 _.3) (0 0 1)) ((_.0 _.1 _.2 _.3 _.4) (1 0 1)) +  ((_0) (1)) 
- ((_.0 _.1 _.2 _.3 _.4 _.5) (0 1 1)) +  ((_0 _1) (0 1)) 
- ((_.0 _.1 _.2 _.3 _.4 _.5 _.6) (1 1 1)) +  ((_0 _1 _2) (1 1)) 
- ((_.0 _.1 _.2 _.3 _.4 _.5 _.6 _.7) (0 0 0 1)) + ((_0 _1 _2 _3) (0 0 1)) 
- ((_.0 _.1 _.2 _.3 _.4 _.5 _.6 _.7 _.8) (1 0 0 1)))+  ((_0 _1 _2 _3 _4) (1 0 1)) 
 + ((_0 _1 _2 _3 _4 _5) (0 1 1)) 
 + ((_0 _1 _2 _3 _4 _5 _6) (1 1 1)) 
 + ((_0 _1 _2 _3 _4 _5 _6 _7) (0 0 0 1)) 
 + ((_0 _1 _2 _3 _4 _5 _6 _7 _8) (1 0 0 1)))
</code> </code>
 

lp-a2.txt · Last modified: 2018/04/08 09:21 by mvc