diff options
author | Eduardo Julian | 2015-08-03 01:29:48 -0400 |
---|---|---|
committer | Eduardo Julian | 2015-08-03 01:29:48 -0400 |
commit | 90399879ee7cc61e6333f7e81141441d32fcdb2e (patch) | |
tree | c2e61e5fae37b1f9f2f4d5cea6196f2274da42ff /source/program.lux | |
parent | bcf0cb737e348dc9e183b1608abbebc5a40ba847 (diff) |
Implemented text-interpolation through a macro ("<>") in lux/data/text
Diffstat (limited to 'source/program.lux')
-rw-r--r-- | source/program.lux | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/program.lux b/source/program.lux index ae3421078..b7cce5714 100644 --- a/source/program.lux +++ b/source/program.lux @@ -17,7 +17,8 @@ hash ord show - number) + number + stack) (data bool char (either #as e) @@ -28,7 +29,7 @@ maybe (number int real) - (text #as t #open ("text:" Text/Monoid)) + (text #as t #refer (#only <>) #open ("text:" Text/Monoid)) writer tuple) (codata (stream #as S) @@ -46,7 +47,7 @@ (program args (case args (\ (list name)) - (println ($ text:++ "Hello, " name "!")) + (println (<> "Hello, #{name}!")) _ (println "Hello, world!"))) |