Hi All,

Factor style question: Is it ok to use spread combinators in places 
where subsequent quots use results from the previous ones? I like the 
symmetry it brings:

(fictitious example:)

: lop-off-back ( seq start -- seq' )
   1+ head ;

: lop-off-front ( seq len -- seq' )
   short tail* ;

: window ( seq start window-width -- subseq )
     [ lop-off-front ] [ lop-off-back ] bi* ;

vs

: window ( seq start window-width -- subseq )
     [ lop-off-front ] dip lop-off-back ;

but obviously it wouldn't work if the quots weren't executed sequentially.

What do you think?

Cheers,

Phil


------------------------------------------------------------------------------
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to