Hello! I have the following code, and it works:
TUPLE: resource-gadget < track res ; : find-resource-window ( resource -- world/f ) [ { [ drop resource-gadget? ] [ res>> = ] } 2&& ] curry find-window ; Resource-gadget is a container for a resource tuple (in the res slot). The function is supposed to find the tuple among the gadgets. I'm trying to rewrite it to be a tad shorter, but get a compilation error: : find-resource-window ( resource -- world/f ) '[ { [ resource-gadget? ] [ res>> _ = ] } 1&& ] find-window ; The error I'm getting is this: Stack effect declaration is wrong inferred ( x -- x x ) declared ( resource -- world/f ) Am I using the fried quotation incorrectly? Or am I missing something obvious? ---=====--- Александр ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk