Fuzion Logo
flang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.

Idiom # 4: Create a function which returns the square of an integer

See programming-idioms.org:


Using a preselected integer type:

Using a type parameter selecting a specific integer type:

Running Example

The version with type parameter can be called with different types: