Author: | rand |
---|---|
Mode: | factor |
Date: | Tue, 1 Sep 2009 12:50:44 |
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? ;