Skip to content

Instantly share code, notes, and snippets.

@anandology
Created February 1, 2023 06:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anandology/c8ff9836e541da642c1645a3d20abb1f to your computer and use it in GitHub Desktop.
Save anandology/c8ff9836e541da642c1645a3d20abb1f to your computer and use it in GitHub Desktop.
Austral Modules example.
import Square (square);
module body Main is
function main(): ExitCode is
let n: Int32 := 5;
let n2:Int32 := square(n);
printLn(n2);
return ExitSuccess();
end;
end module body.
module Square is
function square(n: Int32): Int32;
end module.
module body Square is
function square(n: Int32): Int32 is
return n*n;
end;
end module body.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment