]> gitweb.factorcode.org Git - factor.git/blob - extra/lsys/strings/strings.factor
Fix Windows bootstrap
[factor.git] / extra / lsys / strings / strings.factor
1
2 USING: kernel sequences math combinators.lib combinators.short-circuit ;
3
4 IN: lsys.strings
5
6 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7
8 : has-param? ( slice -- ? ) { [ length 1 > ] [ second CHAR: ( = ] } 1&& ;
9
10 : next+rest ( slice -- next rest ) [ 1 head ] [ 1 tail-slice ] bi ;
11
12 : index-rest ( slice -- i ) CHAR: ) swap index 1+ ;
13
14 : next+rest* ( slice -- next rest ) dup index-rest [ head ] [ tail-slice ] 2bi ;