aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/data/text.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/lux/data/text.lux')
-rw-r--r--stdlib/source/lux/data/text.lux27
1 files changed, 16 insertions, 11 deletions
diff --git a/stdlib/source/lux/data/text.lux b/stdlib/source/lux/data/text.lux
index 81e6e6bd5..042919c24 100644
--- a/stdlib/source/lux/data/text.lux
+++ b/stdlib/source/lux/data/text.lux
@@ -275,14 +275,19 @@
(def: #export (space? char)
{#.doc "Checks whether the character is white-space."}
(-> Char Bit)
- (`` (case char
- (^or (^ (char (~~ (static ..tab))))
- (^ (char (~~ (static ..vertical-tab))))
- (^ (char (~~ (static ..space))))
- (^ (char (~~ (static ..new-line))))
- (^ (char (~~ (static ..carriage-return))))
- (^ (char (~~ (static ..form-feed)))))
- true
-
- _
- false)))
+ (with-expansions [<options> (template [<char>]
+ [(^ (char (~~ (static <char>))))]
+
+ [..tab]
+ [..vertical-tab]
+ [..space]
+ [..new-line]
+ [..carriage-return]
+ [..form-feed]
+ )]
+ (`` (case char
+ (^or <options>)
+ true
+
+ _
+ false))))