! Copyright (C) 2009 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. USING: accessors fry generalizations kernel macros math.order stack-checker math sequences ; IN: combinators.smart MACRO: drop-outputs ( quot -- quot' ) dup outputs '[ @ _ ndrop ] ; MACRO: keep-inputs ( quot -- quot' ) dup inputs '[ _ _ nkeep ] ; MACRO: output>sequence ( quot exemplar -- newquot ) [ dup outputs ] dip '[ @ _ _ nsequence ] ; MACRO: output>array ( quot -- newquot ) '[ _ { } output>sequence ] ; MACRO: input