diff options
Diffstat (limited to 'std/String.bruijn')
-rw-r--r-- | std/String.bruijn | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/std/String.bruijn b/std/String.bruijn index 20634c7..c74d950 100644 --- a/std/String.bruijn +++ b/std/String.bruijn @@ -15,13 +15,19 @@ eq? eq? B.eq? # returns true if character is part of a string in? in? B.eq? -∈ \in? +(∈) in? -:test (∈ 'b' "ab") (true) -:test (∈ 'c' "ab") (false) +ni? \in? + +(∋) ni? + +:test ('b' ∈ "ab") (true) +:test ('c' ∈ "ab") (false) +:test ("ab" ∋ 'b') (true) +:test ("ab" ∋ 'c') (false) # splits string by newline character -lines Z [[rec]] +lines z [[rec]] rec <>?(~broken) (^broken : empty) (^broken : (1 ~(~broken))) broken break (B.eq? '\n') 0 |