Update all new Tasks
This commit is contained in:
parent
00a190b0a6
commit
91df62d461
5697 changed files with 93386 additions and 804 deletions
9
Task/String-matching/Bracmat/string-matching.bracmat
Normal file
9
Task/String-matching/Bracmat/string-matching.bracmat
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
( (sentence="I want a number such that that number will be even.")
|
||||
& out$(@(!sentence:I ?) & "sentence starts with 'I'" | "sentence does not start with 'I'")
|
||||
& out$(@(!sentence:? such ?) & "sentence contains 'such'" | "sentence does not contain 'such'")
|
||||
& out$(@(!sentence:? "even.") & "sentence ends with 'even.'" | "sentence does not end with 'even.'")
|
||||
& 0:?N
|
||||
& ( @(!sentence:? be (? & !N+1:?N & ~))
|
||||
| out$str$("sentence contains " !N " occurrences of 'be'")
|
||||
)
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue