:: map-reduce-test ( a b c -- d ) [ a b c ] [ a - ] [ b * + ] map-reduce-outputs ;
[ ] [ 1 2 3 map-reduce-test ] unit-test
+
+[ ( x x -- x ) ] [ [ curry inputs ] infer ] unit-test
+
+[ ( x -- x ) ] [ [ [ curry ] curry inputs ] infer ] unit-test
] if*
] "special" set-word-prop
-! TODO: Handle the case where a nested call to infer-known returns f
-
M: curried infer-known*
- quot>> infer-known curry-effect ;
+ quot>> infer-known dup [
+ curry-effect
+ ] [
+ drop f
+ ] if ;
M: composed infer-known*
[ quot1>> ] [ quot2>> ] bi
- [ infer-known ] bi@ compose-effects ;
+ [ infer-known ] bi@
+ 2dup and [ compose-effects ] [ 2drop f ] if ;
M: declared-effect infer-known*
known>> infer-known* ;
-M: input-parameter infer-known* \ inputs/outputs unknown-macro-input ;
+M: input-parameter infer-known* drop f ;
M: object infer-known* drop f ;