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