From ccfc4dd57de1d3f7ef52b8137552382a28c52414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Kukie=C5=82a?= <53443372+kukimik@users.noreply.github.com> Date: Tue, 23 Sep 2025 14:38:06 +0200 Subject: [PATCH] fix: rename `from` parameter (reserved keyword) --- src/records.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/records.md b/src/records.md index a600652c..a802f3c7 100644 --- a/src/records.md +++ b/src/records.md @@ -116,19 +116,19 @@ form of named parameters building on records. For example, we can write a function translate to translate from one language to another as follows: ```flix -def translate(from: {from = Language}, to: {to = Language}, text: String): String = ??? +def translate(src: {src = Language}, dst: {dst = Language}, text: String): String = ??? ``` We can call this function as follows: ```flix -translate({from = English}, {to = French}, "Where is the library?") +translate({src = English}, {dst = French}, "Where is the library?") ``` Since such verbosity gets tedious, we can also use the syntactic sugar: ```flix -translate(from = English, to = French, "Where is the library?") +translate(src = English, dst = French, "Where is the library?") ``` which is equivalent to the above.