diff --git a/spec/v0.2.md b/spec/v0.2.md index 34adec4..f96665d 100644 --- a/spec/v0.2.md +++ b/spec/v0.2.md @@ -28,7 +28,7 @@ Fun is **case-sensitive**. `Hacker` and `hacker` are different identifiers. Reserved words cannot be redefined: -`if`, `else`, `for`, `while`, `fi`, `fun`, `global`, `private`, `return`, `true`, `false`. +`if`, `else`, `for`, `while`, `fun`, `global`, `private`, `return`, `true`, `false`. ### Comments @@ -146,7 +146,7 @@ private number count = 42 number nothing = 23 ``` - - Dynamic variables +### Dynamic variables ```fun dynamic string x = 42 @@ -271,9 +271,16 @@ The next step... ;) ## 10. Reflections +Return "number", "string", etc. + ```fun -typeof(x) // Returns "number", "string", etc. -methods(obj) // Lists callable methods +string the_type_is = typeof(x) +``` + +List callable methods + +```fun +array these_are_callable = methods(object) ``` ## 11. Internal functions