From 888dc61df897ae2982ab657183f5e98e01e1ed84 Mon Sep 17 00:00:00 2001 From: Rigidity Date: Fri, 5 Jul 2024 23:37:30 -0400 Subject: [PATCH] Fix mistakes in docs --- docs/definitions/functions.md | 6 +++--- docs/types/enums.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/definitions/functions.md b/docs/definitions/functions.md index 115bca2..65bdd58 100644 --- a/docs/definitions/functions.md +++ b/docs/definitions/functions.md @@ -87,7 +87,7 @@ A lambda function, also known as an [anonymous function](https://en.wikipedia.or It's convenient for passing functions as parameters: ```rue -fun main() -> Int { +fun main() -> Int[] { map([1, 2, 3], fun(num) => num * 100) } @@ -106,7 +106,7 @@ You can define generic types on functions which will get replaced when called. Here's a simple example, building on the previous: ```rue -fun main() -> Int { +fun main() -> Int[] { map([1, 2, 3], fun(num) => num * 100) } @@ -138,7 +138,7 @@ Here is an example of this: ```rue fun main() -> Int { - let doubler = fn(2); + let doubler = multiplier(2); doubler(1000) } diff --git a/docs/types/enums.md b/docs/types/enums.md index 6b3c6da..7656c0b 100644 --- a/docs/types/enums.md +++ b/docs/types/enums.md @@ -22,7 +22,7 @@ fun main() -> Int { let mode: Mode = locked; // Now we can check the type - if !(mode is Mode::Locked) { + if mode is Mode::Unlocked { raise "This isn't possible."; }