Skip to content

Namespaces

Utku Melemetci edited this page May 17, 2024 · 1 revision

You can use namespaces to further organize code. If you know C++ this should look pretty familiar:

namespace math {
    func sub(a: Int, b: Int) -> Int {
        return a - b
    }
}

func main() {
    std::print_int(math::sub(10, 3))
}
Clone this wiki locally