On May 26, 2025, at 11:05 PM, tovilo.ilija <tovilo.il...@gmail.com> wrote:
In the "Single-Expression functions in other languages" section, at least the Rust and Swift examples are wrong, as such a syntax does not exist for either of them. In case you got this info from an LLM, you should always fact-check whatever an AI tells you. Sure I did. Seems like I was confused by specifying a variable type along with the assigned value: Documentation <https://docs.swift.org/swift-book/documentation/the-swift-programming-language/functions/#Using-Function-Types> docs.swift.org <https://docs.swift.org/swift-book/documentation/the-swift-programming-language/functions/#Using-Function-Types> [image: favicon.ico] <https://docs.swift.org/swift-book/documentation/the-swift-programming-language/functions/#Using-Function-Types> <https://docs.swift.org/swift-book/documentation/the-swift-programming-language/functions/#Using-Function-Types> var mathFunction: (Int, Int) -> Int = addTwoInts I’ve double checked examples and removed Swift and Rust. Thanks for that. ---------- Best regards, Dmitrii Derepko. @xepozz