Remove repro

This commit is contained in:
Fabio Labella 2023-03-03 12:30:45 +00:00
parent 5aaebb24d9
commit a947d0dc76
2 changed files with 9 additions and 23 deletions

View File

@ -214,21 +214,8 @@
(define (unison-POp-ADDN m n) (fx+ m n))
(define (unison-POp-ANDN m n) (fxand m n))
(define unison-POp-BLDS
(let* ([empty empty-chunked-list]
[one (chunked-list-add-last empty 1)]
[one-two (chunked-list-add-last one 2)]
[three (chunked-list-add-last empty 3)]
[one-three (chunked-list-append one three)]
[one-two-three (chunked-list-append one-two three)])
(newline)
(display "[1] ++ [3]: ")
(display one-three)
(newline)
(display "[1, 2] ++ [3]: ")
(display one-two-three)
(newline)
(lambda args-list
(fold-right (lambda (e l) (chunked-list-add-first l e)) empty-chunked-list args-list))))
(lambda args-list
(fold-right (lambda (e l) (chunked-list-add-first l e)) empty-chunked-list args-list)))
(define (unison-POp-CATS l r) (chunked-list-append l r))
(define (unison-POp-CATT l r) (istring-append l r))
(define (unison-POp-CMPU l r) (universal-compare l r))

View File

@ -42,14 +42,12 @@ list.tests = do
check "List.empty builder" do
_ = []
true
-- check "List builder" do
-- _ = [1, 2, 3]
-- true
-- checkEqual "List.cons" (1 +: (2 +: (3 +: []))) [1, 2, 3]
-- checkEqual "List.snoc" ([] :+ 1 :+ 2 :+ 3) [1, 2, 3]
-- checkEqual "List.++" ([] ++ [1, 2] ++ [3, 4] ++ []) [1, 2, 3, 4]
-- checkEqual "++.bug (1)" ([1] ++ [3]) []
-- checkEqual "++.bug (2)" ([1, 2] ++ [3]) []
check "List builder" do
_ = [1, 2, 3]
true
checkEqual "List.cons" (1 +: (2 +: (3 +: []))) [1, 2, 3]
checkEqual "List.snoc" ([] :+ 1 :+ 2 :+ 3) [1, 2, 3]
checkEqual "List.++" ([] ++ [1, 2] ++ [3, 4] ++ []) [1, 2, 3, 4]
-- checkEqual "List.take (1)" (List.take 0 [1,2,3]) []
-- checkEqual "List.take (2)" (List.take 2 [1,2,3]) [1,2]
-- checkEqual "List.take (3)" (List.take 100 [1,2,3]) [1,2,3]
@ -68,3 +66,4 @@ list.tests = do
-- TODO pattern matching and equality
-- VWLS List.viewl : List a -> SeqView a (List a)
-- VWRS List.viewr : List a -> SeqView (List a) a