Nex

Hello, world

The first program — print to stdout — followed by a function and a calculation.

Hello, world

def main() =
  print("Hello, Nex!")

A function and a calculation

def hypotenuse(a: real, b: real) = sqrt(a^2 + b^2)

def main() =
  print(s"hypotenuse(3, 4) = ${hypotenuse(3.0, 4.0)}")

Search

Esc
to navigate to open Esc to close