stack-checker: maybe add a test that tests what the todo said.

db4
John Benediktsson 2013-03-27 18:44:32 -07:00
parent c6e72c40ae
commit 2ef3266406
1 changed files with 7 additions and 1 deletions

View File

@ -450,7 +450,13 @@ DEFER: eee'
[ [ [ append ] strict-each ] infer ] [ unbalanced-branches-error? ] must-fail-with
[ [ [ 1 + ] strict-2map ] infer ] [ unbalanced-branches-error? ] must-fail-with
! TODO: ensure that polymorphic checking works on recursive combinators
! ensure that polymorphic checking works on recursive combinators
: recursive-reduce ( identity i seq quot: ( prev elt -- next ) -- x )
2over bounds-check? [
[ [ nth-unsafe ] dip call ] 3keep [ 1 + ] 2dip recursive-reduce
] [ 3drop ] if ; inline recursive
{ 24995000 } [ 0 0 10000 iota [ dup even? [ + ] [ drop ] if ] recursive-reduce ] unit-test
{ 4 1 } [ [ member? [ 1 + ] when ] curry recursive-reduce ] must-infer-as
[ [ [ write write ] each ] infer ] [ unbalanced-branches-error? ] must-fail-with