multi-arrows: arrows with multiple inputs

db4
Sam Anklesaria 2009-05-05 20:11:34 -05:00
parent f6345c72ce
commit fc01d07839
1 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,11 @@
! Copyright (C) 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: models.arrow models.product stack-checker accessors fry
generalizations kernel ;
IN: models.arrow.multi
: <n-arrow> ( quot int -- arrow )
[ narray <product> ] [ '[ _ firstn @ ] <arrow> ] bi ; inline
: <2arrow> ( a b quot -- arrow ) 2 <n-arrow> ;
: <3arrow> ( a b c quot -- arrow ) 3 <n-arrow> ;