Fix types for foldl and foldr with 3 lists.
Thanks to Jack Firth for the report. original commit: 9030680e312c54522bdd801c6113400535c1965a
This commit is contained in:
parent
24673c7642
commit
544a8cc2a1
|
@ -657,11 +657,11 @@
|
|||
(-poly (a b c d)
|
||||
(cl-> [((a b . -> . b) b (-lst a)) b]
|
||||
[((a b c . -> . c) c (-lst a) (-lst b)) c]
|
||||
[((a b c d . -> . d) d (-lst a) (-lst b) (-lst d)) d]))]
|
||||
[((a b c d . -> . d) d (-lst a) (-lst b) (-lst c)) d]))]
|
||||
[foldr (-poly (a b c d)
|
||||
(cl-> [((a b . -> . b) b (-lst a)) b]
|
||||
[((a b c . -> . c) c (-lst a) (-lst b)) c]
|
||||
[((a b c d . -> . d) d (-lst a) (-lst b) (-lst d)) d]))]
|
||||
[((a b c d . -> . d) d (-lst a) (-lst b) (-lst c)) d]))]
|
||||
[filter (-poly (a b) (cl->*
|
||||
((asym-pred a Univ (-FS (-filter b 0) -top))
|
||||
(-lst a)
|
||||
|
|
|
@ -1155,6 +1155,19 @@
|
|||
(-polydots (a) ((list) (a a) . ->... . -Integer))]
|
||||
|#
|
||||
|
||||
[tc-e (foldl (lambda: ([x : Integer] [acc : String]) acc) "" '(1 2 3))
|
||||
-String]
|
||||
[tc-e (foldl (lambda: ([x : Integer] [y : Float] [acc : String]) acc) "" '(1 2 3) '(1.2 3.4 5.6))
|
||||
-String]
|
||||
[tc-e (foldl (lambda: ([x : Integer] [y : Float] [z : Symbol ] [acc : String]) acc) "" '(1 2 3) '(1.2 3.4 5.6) '(a b c))
|
||||
-String]
|
||||
[tc-e (foldr (lambda: ([x : Integer] [acc : String]) acc) "" '(1 2 3))
|
||||
-String]
|
||||
[tc-e (foldr (lambda: ([x : Integer] [y : Float] [acc : String]) acc) "" '(1 2 3) '(1.2 3.4 5.6))
|
||||
-String]
|
||||
[tc-e (foldr (lambda: ([x : Integer] [y : Float] [z : Symbol ] [acc : String]) acc) "" '(1 2 3) '(1.2 3.4 5.6) '(a b c))
|
||||
-String]
|
||||
|
||||
;; First is same as second, but with map explicitly instantiated.
|
||||
[tc-e/t (plambda: (a ...) [ys : (a ... a -> Number) *]
|
||||
(lambda: [zs : a ... a]
|
||||
|
|
Loading…
Reference in New Issue
Block a user