docs/gettingstarted.md: Remove the "Main" section
Signed-off-by: Username404 <w.iron.zombie@gmail.com>
This commit is contained in:
parent
7ebf0ab5a4
commit
9e29ec8c29
|
@ -20,15 +20,7 @@ getHelloWorld: String >> {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### 2.1 - Main
|
### 2.1 - Function parameters
|
||||||
Main can be a variable named `main` that contains an anonymous function, a function named `main` or a function that has the `as_main` attribute:
|
|
||||||
```
|
|
||||||
main #= {}
|
|
||||||
main >> {}
|
|
||||||
as_main helloWorld >> {}
|
|
||||||
```
|
|
||||||
|
|
||||||
### 2.2 - Function parameters
|
|
||||||
Parameters can be added to an anonymous function by specifying the types as follows:
|
Parameters can be added to an anonymous function by specifying the types as follows:
|
||||||
```
|
```
|
||||||
addIntToString: (int, String)~ #= { a, b;
|
addIntToString: (int, String)~ #= { a, b;
|
||||||
|
@ -43,7 +35,7 @@ addIntToString(a: int, b: String) => {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### 2.3 - Function calls
|
### 2.2 - Function calls
|
||||||
A function can be simply invoked like this if it has no parameters:
|
A function can be simply invoked like this if it has no parameters:
|
||||||
```
|
```
|
||||||
helloWorld()
|
helloWorld()
|
||||||
|
@ -97,7 +89,5 @@ class Program {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
main >> {
|
program #= Program("World")
|
||||||
Program("World")
|
|
||||||
}
|
|
||||||
```
|
```
|
Loading…
Reference in New Issue