aboutsummaryrefslogtreecommitdiff
path: root/docs/langs.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/langs.md')
-rw-r--r--docs/langs.md10
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/langs.md b/docs/langs.md
index d7225ae5..aec9cfa9 100644
--- a/docs/langs.md
+++ b/docs/langs.md
@@ -11,7 +11,7 @@ where a different type of string is needed.
```tomo
lang HTML:
convert(t:Text -> HTML):
- t = t:translate({
+ t = t.translate({
"&" = "&",
"<" = "&lt;",
">" = "&gt;",
@@ -75,14 +75,14 @@ instead of building a global function called `execute()` that takes a
```tomo
lang Sh:
convert(text:Text -> Sh):
- return Sh.from_text("'" ++ text:replace("'", "''") ++ "'")
+ return Sh.from_text("'" ++ text.replace("'", "''") ++ "'")
func execute(sh:Sh -> Text):
...
dir := ask("List which dir? ")
cmd := $Sh@(ls -l @dir)
-result := cmd:execute()
+result := cmd.execute()
```
## Conversions
@@ -94,12 +94,12 @@ another type's block or at the top level.
```tomo
lang Sh:
convert(text:Text -> Sh):
- return Sh.from_text("'" ++ text:replace("'", "''") ++ "'")
+ return Sh.from_text("'" ++ text.replace("'", "''") ++ "'")
struct Foo(x,y:Int):
convert(f:Foo -> Sh):
return Sh.from_text("$(f.x),$(f.y)")
convert(texts:[Text] -> Sh):
- return $Sh" ":join([Sh(t) for t in texts])
+ return $Sh" ".join([Sh(t) for t in texts])
```