Welcome to the Fractal++ learning experience! In this interactive tutorial, you'll learn
the basics of Fractal++ programming through examples and exercises.
Step 1: Importing Modules
Example:
<^>::=importio
Exercise:
Import the math module using the <^> syntax.
Step 2: Defining Constants
Example:
<#>::="Fractal++ is the best language!"
Exercise:
Define a constant named PI with the value 3.14159.
Step 3: Defining Functions
Example:
<$>::=(msg)=>{io.console(msg)}
Exercise:
Define a function named greet that takes a parameter name and prints
"Hello, [name]!".
Step 4: Recursive Functions
Example:
<@>::=(n)=>{if(n===0){return1}returnn*<@>(n-1)}
Exercise:
Write a recursive function named countDown that takes a number n as input
and returns a string with the numbers from n down to 1 separated by
newline characters (\n).