Fix type for add-between.

original commit: b1577bd307ac1c8136630a3949755f833a8073d2
This commit is contained in:
Vincent St-Amour 2012-07-24 16:21:39 -04:00
parent 97644237e6
commit 2b8e955f68
2 changed files with 3 additions and 4 deletions

View File

@ -368,7 +368,7 @@
[tc-e (string-join '("hello" "world") #:before-first "a") -String]
[tc-e (add-between '(1 2 3) 0) (-lst -Byte)]
[tc-e (add-between '(1 2 3) 'a) (-lst (t:Un -PosByte (-val 'a)))]
[tc-e ((inst add-between Positive-Byte Symbol) '(1 2 3) 'a #:before-first 'b) (-lst (t:Un -PosByte -Symbol))]
[tc-e ((inst add-between Positive-Byte Symbol) '(1 2 3) 'a #:splice? #t #:before-first '(b)) (-lst (t:Un -PosByte -Symbol))]
[tc-e (apply (plambda: (a) [x : a *] x) '(5)) (-lst -PosByte)]
[tc-e (apply append (list '(1 2 3) '(4 5 6))) (-lst -PosByte)]

View File

@ -1426,10 +1426,9 @@
[last (-poly (a) ((-lst a) . -> . a))]
[add-between (-poly (a b) ((-lst a) b
#:splice? -Boolean #f
#:nothing Univ #f ; default is gensym
#:before-first b #f
#:before-first (-lst b) #f
#:before-last b #f
#:after-last b #f
#:after-last (-lst b) #f
. ->key . (-lst (Un a b))))]
[last-pair (-poly (a) ((-mu x (Un a (-val '()) (-pair a x)))