Paste: --

Author: rand
Mode: factor
Date: Tue, 1 Sep 2009 12:50:44
Plain Text |
ERROR: line-first-wrong-arguments-order ;
M: line-first-wrong-arguments-order summary 
drop "the longer line should come before the matching string" ;

: begins-with? ( line string -- ? )
    2dup shorter? [ line-first-wrong-arguments-order ]
                  [ zip [ first2 = ] all? ] if ;

: ends-with? ( line str -- ? ) 
    [ <reversed> ] bi@ begins-with? ;

New Annotation

Summary:
Author:
Mode:
Body: