Skip to content

Commit 10769cd

Browse files
committed
docs: fix primitive typ
1 parent 0411684 commit 10769cd

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

docs/reference/primitive_types.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@
88
* `Pointer` - raw memory address *(only meaningful in `unsafe` code)*
99

1010
> Any primitive may have a **nullable** counterpart via `?` (e.g., `Int?`).
11-
>

docs/reference/syntax.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939
* Namespace resolution with `::` (e.g., `sys::Print`).
4040
* Preprocessor: `#import`, `#define`, `#ifdef`, `#ifndef`, `#else`, `#undef`.
4141

42+
> **Note**: `#define` cannot be used to really define something, it is a way to control what code will be used.
43+
4244
## Functional Objects (`call`)
4345

4446
* Classes or interfaces can declare a **special `call`** member that makes instances **callable** like functions.
@@ -62,12 +64,12 @@ class DefinedFunctional {
6264
}
6365
6466
// Defines the callable behavior; pure body allowed
65-
public call(secondMultiplier: Int): Int = pure fun(secondMultiplier: Int): Int {
67+
public call(secondMultiplier: Int): Int = fun(secondMultiplier: Int): Int {
6668
return Multiplier * secondMultiplier
6769
}
6870
}
6971
70-
val AddNullable: CustomFunctional = fun(a: Int?, b: Int?): Int {
72+
val AddNullable: CustomFunctional = pure fun(a: Int?, b: Int?): Int {
7173
return (a ?: 0) + (b ?: 0)
7274
}
7375

0 commit comments

Comments
 (0)