Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
11
Task/String-matching/Factor/string-matching.factor
Normal file
11
Task/String-matching/Factor/string-matching.factor
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/* Does cheesecake start with cheese? */
|
||||
"cheesecake" "cheese" head? ! t
|
||||
/* Does cheesecake contain sec at any location? */
|
||||
"sec" "cheesecake" subseq? ! t
|
||||
/* Does cheesecake end with cake? */
|
||||
"cheesecake" "cake" tail? ! t
|
||||
/* Where in cheesecake is the leftmost sec? */
|
||||
"sec" "cheesecake" subseq-start ! 4
|
||||
/* Where in Mississippi are all occurrences of iss? */
|
||||
USE: regexp
|
||||
"Mississippi" "iss" <regexp> all-matching-slices [ from>> ] map ! { 1 4 }
|
||||
Loading…
Add table
Add a link
Reference in a new issue