From 1a196aa8f724971e531487f9cdd541f7957cfd92 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 6 Apr 2025 23:37:05 -0400 Subject: Update syntax in docs --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 5d7f35a4..201077f3 100644 --- a/README.md +++ b/README.md @@ -5,14 +5,14 @@ language that cross-compiles to C. Tomo is designed to anticipate and influence the language design decisions of the future. ``` -func greeting(name:Text, add_exclamation:Bool -> Text): +func greeting(name:Text, add_exclamation:Bool -> Text) message := "hello $name" message = " ".join([w.title() for w in message.split_any(" ")]) - if add_exclamation: + if add_exclamation message ++= "!!!" return message -func main(name:Text, shout=no): +func main(name:Text, shout=no) to_say := greeting(name, add_exclamation=shout) say(to_say) ``` -- cgit v1.2.3