From c2362aca137f17c23c2a421260f258756fcb7921 Mon Sep 17 00:00:00 2001 From: Dummi26 Date: Thu, 13 Apr 2023 03:27:51 +0200 Subject: [PATCH] fixed small issue in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4bac611..b62e3f3 100755 --- a/README.md +++ b/README.md @@ -209,7 +209,7 @@ You have to cover `[]/int` because the condition in the loop might not match for ### Let's read a file! file = fs_read(&args.get(0).assume1("please provided a text file to read!")) - switch! {} + switch! file {} Since `get()` can fail, it returns `[]/[t]` where t is the type of elements in the list. To avoid handling the `[]` case, the `assume1()` builtin takes a `[]/[t]` and returns `t`. If the value is `[]`, it will cause a crash.