diff options
Diffstat (limited to 'api')
| -rw-r--r-- | api/builtins.yaml | 16 | ||||
| -rw-r--r-- | api/lists.yaml | 76 | ||||
| -rw-r--r-- | api/nums.yaml | 104 | ||||
| -rw-r--r-- | api/paths.yaml | 92 | ||||
| -rw-r--r-- | api/sets.yaml | 20 | ||||
| -rw-r--r-- | api/tables.yaml | 18 |
6 files changed, 163 insertions, 163 deletions
diff --git a/api/builtins.yaml b/api/builtins.yaml index 848ea2a5..83222660 100644 --- a/api/builtins.yaml +++ b/api/builtins.yaml @@ -33,7 +33,7 @@ ask: example: | >> ask("What's your name? ") = "Arthur Dent" - + exit: short: exit the program description: > @@ -56,7 +56,7 @@ exit: The status code that the program with exit with. example: | exit(status=1, "Goodbye forever!") - + getenv: short: get an environment variable description: > @@ -73,7 +73,7 @@ getenv: example: | >> getenv("TERM") = "xterm-256color"? - + print: short: print some text description: > @@ -95,7 +95,7 @@ print: example: | print("Hello ", newline=no) print("world!") - + say: short: print some text description: > @@ -117,7 +117,7 @@ say: example: | say("Hello ", newline=no) say("world!") - + setenv: short: set an environment variable description: > @@ -137,7 +137,7 @@ setenv: The new value of the environment variable. example: | setenv("FOOBAR", "xyz") - + sleep: short: wait for an interval description: > @@ -153,7 +153,7 @@ sleep: How many seconds to sleep for. example: | sleep(1.5) - + fail: short: abort the program description: > @@ -169,7 +169,7 @@ fail: The error message to print. example: | fail("Oh no!") - + USE_COLOR: short: whether to use colors type: Bool diff --git a/api/lists.yaml b/api/lists.yaml index d729fd66..6648fe94 100644 --- a/api/lists.yaml +++ b/api/lists.yaml @@ -23,13 +23,13 @@ List.binary_search: example: | >> [1, 3, 5, 7, 9].binary_search(5) = 3 - + >> [1, 3, 5, 7, 9].binary_search(-999) = 1 - + >> [1, 3, 5, 7, 9].binary_search(999) = 6 - + List.by: short: slice by a step value description: > @@ -50,7 +50,7 @@ List.by: example: | >> [1, 2, 3, 4, 5, 6].by(2) = [1, 3, 5] - + List.clear: short: clear a list description: > @@ -66,7 +66,7 @@ List.clear: The mutable reference to the list to be cleared. example: | >> my_list.clear() - + List.counts: short: count occurrences description: > @@ -83,7 +83,7 @@ List.counts: example: | >> [10, 20, 30, 30, 30].counts() = {10=1, 20=1, 30=3} - + List.find: short: find an element's index description: > @@ -104,10 +104,10 @@ List.find: example: | >> [10, 20, 30, 40, 50].find(20) = 2 : Int? - + >> [10, 20, 30, 40, 50].find(9999) = none : Int? - + List.from: short: slice an array from a start index description: > @@ -128,7 +128,7 @@ List.from: example: | >> [10, 20, 30, 40, 50].from(3) = [30, 40, 50] - + List.has: short: check for member description: > @@ -149,7 +149,7 @@ List.has: example: | >> [10, 20, 30].has(20) = yes - + List.heap_pop: short: heap pop description: > @@ -175,7 +175,7 @@ List.heap_pop: >> my_heap.heapify() >> my_heap.heap_pop() = 10 - + List.heap_push: short: heap push description: > @@ -201,7 +201,7 @@ List.heap_push: default comparison function for the item type will be used. example: | >> my_heap.heap_push(10) - + List.heapify: short: convert a list into a heap description: > @@ -224,7 +224,7 @@ List.heapify: example: | >> my_heap := [30, 10, 20] >> my_heap.heapify() - + List.insert: short: add an item to a list description: > @@ -255,11 +255,11 @@ List.insert: >> list.insert(30) >> list = [10, 20, 30] - + >> list.insert(999, at=2) >> list = [10, 999, 20, 30] - + List.insert_all: short: add multiple items to a list description: > @@ -290,11 +290,11 @@ List.insert_all: list.insert_all([30, 40]) >> list = [10, 20, 30, 40] - + list.insert_all([99, 100], at=2) >> list = [10, 99, 100, 20, 30, 40] - + List.pop: short: pop an item from a list description: > @@ -321,17 +321,17 @@ List.pop: to pop the last value. example: | >> list := [10, 20, 30, 40] - + >> list.pop() = 40 >> list = &[10, 20, 30] - + >> list.pop(index=2) = 20 >> list = &[10, 30] - + List.random: short: pick a random element description: > @@ -355,7 +355,7 @@ List.random: example: | >> [10, 20, 30].random() = 20 - + List.remove_at: short: remove an item by index description: > @@ -387,11 +387,11 @@ List.remove_at: list.remove_at(2) >> list = [10, 30, 40, 50] - + list.remove_at(2, count=2) >> list = [10, 50] - + List.remove_item: short: remove an item by value description: > @@ -421,11 +421,11 @@ List.remove_item: list.remove_item(10) >> list = [20, 20, 30] - + list.remove_item(20, max_count=1) >> list = [20, 30] - + List.reversed: short: get a reversed list description: > @@ -442,7 +442,7 @@ List.reversed: example: | >> [10, 20, 30].reversed() = [30, 20, 10] - + List.sample: short: weighted random choices description: > @@ -487,7 +487,7 @@ List.sample: example: | >> [10, 20, 30].sample(2, weights=[90%, 5%, 5%]) = [10, 10] - + List.shuffle: short: shuffle a list in place description: > @@ -510,7 +510,7 @@ List.shuffle: generation) example: | >> list.shuffle() - + List.shuffled: short: return a shuffled list description: > @@ -534,7 +534,7 @@ List.shuffled: example: | >> [10, 20, 30, 40].shuffled() = [40, 10, 30, 20] - + List.slice: short: get a slice of a list description: > @@ -561,10 +561,10 @@ List.slice: example: | >> [10, 20, 30, 40, 50].slice(2, 4) = [20, 30, 40] - + >> [10, 20, 30, 40, 50].slice(-3, -2) = [30, 40] - + List.sort: short: sort a list description: > @@ -588,11 +588,11 @@ List.sort: list.sort() >> list = [-30, 10, 20, 40] - + list.sort(func(a,b:&Int): a.abs() <> b.abs()) >> list = [10, 20, -30, 40] - + List.sorted: short: sorted copy of a list description: > @@ -614,10 +614,10 @@ List.sorted: example: | >> [40, 10, -30, 20].sorted() = [-30, 10, 20, 40] - + >> [40, 10, -30, 20].sorted(func(a,b:&Int): a.abs() <> b.abs()) = [10, 20, -30, 40] - + List.to: short: slice a list to an end index description: > @@ -638,10 +638,10 @@ List.to: example: | >> [10, 20, 30, 40, 50].to(3) = [10, 20, 30] - + >> [10, 20, 30, 40, 50].to(-2) = [10, 20, 30, 40] - + List.unique: short: convert a list to a set description: > @@ -658,7 +658,7 @@ List.unique: example: | >> [10, 20, 10, 10, 30].unique() = {10, 20, 30} - + List.where: short: find an index where a predicate matches description: > diff --git a/api/nums.yaml b/api/nums.yaml index 2c18fac5..bae87a5b 100644 --- a/api/nums.yaml +++ b/api/nums.yaml @@ -14,7 +14,7 @@ Num.abs: example: | >> (-3.5).abs() = 3.5 - + Num.acos: short: arc cosine description: > @@ -31,7 +31,7 @@ Num.acos: example: | >> (0.0).acos() // -> (π/2) = 1.5708 - + Num.acosh: short: arc hyperbolic cosine description: > @@ -48,7 +48,7 @@ Num.acosh: example: | >> (1.0).acosh() = 0 - + Num.asin: short: arc sine description: > @@ -65,7 +65,7 @@ Num.asin: example: | >> (0.5).asin() // -> (π/6) = 0.5236 - + Num.asinh: short: arc hyperbolic sine description: > @@ -82,7 +82,7 @@ Num.asinh: example: | >> (0.0).asinh() = 0 - + Num.atan: short: arc tangent description: > @@ -99,7 +99,7 @@ Num.atan: example: | >> (1.0).atan() // -> (π/4) = 0.7854 - + Num.atan2: short: arc tangent from 2 variables description: > @@ -120,7 +120,7 @@ Num.atan2: example: | >> Num.atan2(1, 1) // -> (π/4) = 0.7854 - + Num.atanh: short: arc hyperbolic tangent. description: > @@ -137,7 +137,7 @@ Num.atanh: example: | >> (0.5).atanh() = 0.5493 - + Num.cbrt: short: cube root description: > @@ -154,7 +154,7 @@ Num.cbrt: example: | >> (27.0).cbrt() = 3 - + Num.ceil: short: ceiling function description: > @@ -171,7 +171,7 @@ Num.ceil: example: | >> (3.2).ceil() = 4 - + Num.clamped: short: clamp a number description: > @@ -197,7 +197,7 @@ Num.clamped: example: | >> (2.5).clamped(5.5, 10.5) = 5.5 - + Num.copysign: short: copy a number's sign description: > @@ -218,7 +218,7 @@ Num.copysign: example: | >> (3.0).copysign(-1) = -3 - + Num.cos: short: cosine description: > @@ -235,7 +235,7 @@ Num.cos: example: | >> (0.0).cos() = 1 - + Num.cosh: short: hyperbolic cosine description: > @@ -252,7 +252,7 @@ Num.cosh: example: | >> (0.0).cosh() = 1 - + Num.erf: short: error function description: > @@ -269,7 +269,7 @@ Num.erf: example: | >> (0.0).erf() = 0 - + Num.erfc: short: complimentary error function description: > @@ -286,7 +286,7 @@ Num.erfc: example: | >> (0.0).erfc() = 1 - + Num.exp: short: base-e exponentiation description: > @@ -303,7 +303,7 @@ Num.exp: example: | >> (1.0).exp() = 2.7183 - + Num.exp2: short: base-2 exponentiation description: > @@ -320,7 +320,7 @@ Num.exp2: example: | >> (3.0).exp2() = 8 - + Num.expm1: short: base-e exponential minus 1 description: > @@ -337,7 +337,7 @@ Num.expm1: example: | >> (1.0).expm1() = 1.7183 - + Num.fdim: short: positive difference description: > @@ -357,10 +357,10 @@ Num.fdim: The second number. example: | fd - + >> (5.0).fdim(3) = 2 - + Num.floor: short: floor function description: > @@ -377,7 +377,7 @@ Num.floor: example: | >> (3.7).floor() = 3 - + Num.hypot: short: Euclidean distance function description: > @@ -398,7 +398,7 @@ Num.hypot: example: | >> Num.hypot(3, 4) = 5 - + Num.isfinite: short: check for finite number description: > @@ -417,7 +417,7 @@ Num.isfinite: = yes >> Num.INF.isfinite() = no - + Num.is_between: short: check if a number is in a range description: > @@ -446,7 +446,7 @@ Num.is_between: = no >> (7.5).is_between(1, 7.5) = yes - + Num.isinf: short: check for infinite number description: > @@ -465,7 +465,7 @@ Num.isinf: = yes >> (1.0).isinf() = no - + Num.j0: short: Bessel function description: > @@ -482,7 +482,7 @@ Num.j0: example: | >> (0.0).j0() = 1 - + Num.j1: short: Bessel function description: > @@ -499,7 +499,7 @@ Num.j1: example: | >> (0.0).j1() = 0 - + Num.log: short: natural logarithm description: > @@ -516,7 +516,7 @@ Num.log: example: | >> Num.E.log() = 1 - + Num.log10: short: logarithm base-10 description: > @@ -533,7 +533,7 @@ Num.log10: example: | >> (100.0).log10() = 2 - + Num.log1p: short: logarithm of 1 plus x description: > @@ -550,7 +550,7 @@ Num.log1p: example: | >> (1.0).log1p() = 0.6931 - + Num.log2: short: logarithm base-2 description: > @@ -567,7 +567,7 @@ Num.log2: example: | >> (8.0).log2() = 3 - + Num.logb: short: exponent of a floating point value description: > @@ -584,7 +584,7 @@ Num.logb: example: | >> (8.0).logb() = 3 - + Num.mix: short: mix two numbers by an amount description: > @@ -611,7 +611,7 @@ Num.mix: = 15 >> (0.25).mix(10, 20) = 12.5 - + Num.near: short: check if two numbers are near each other description: > @@ -644,13 +644,13 @@ Num.near: example: | >> (1.0).near(1.000000001) = yes - + >> (100.0).near(110, ratio=0.1) = yes - + >> (5.0).near(5.1, min_epsilon=0.1) = yes - + Num.nextafter: short: next floating point number description: > @@ -671,7 +671,7 @@ Num.nextafter: example: | >> (1.0).nextafter(1.1) = 1.0000000000000002 - + Num.parse: short: convert text to number description: > @@ -705,7 +705,7 @@ Num.parse: = 1.5 : Num? >> remainder = "junk" - + Num.percent: short: format as a percentage description: > @@ -758,7 +758,7 @@ Num.with_precision: = 123500 >> (1234567.).with_precision(5) = 1234565 - + Num.rint: short: round to nearest integer description: > @@ -777,7 +777,7 @@ Num.rint: = 4 >> (2.5).rint() = 2 - + Num.round: short: round to nearest integer description: > @@ -796,7 +796,7 @@ Num.round: = 2 >> (2.7).round() = 3 - + Num.significand: short: get mantissa description: > @@ -813,7 +813,7 @@ Num.significand: example: | >> (1234.567).significand() = 0.1234567 - + Num.sin: short: sine description: > @@ -830,7 +830,7 @@ Num.sin: example: | >> (0.0).sin() = 0 - + Num.sinh: short: hyperbolic sine description: > @@ -847,7 +847,7 @@ Num.sinh: example: | >> (0.0).sinh() = 0 - + Num.sqrt: short: square root description: > @@ -864,7 +864,7 @@ Num.sqrt: example: | >> (16.0).sqrt() = 4 - + Num.tan: short: tangent description: > @@ -881,7 +881,7 @@ Num.tan: example: | >> (0.0).tan() = 0 - + Num.tanh: short: hyperbolic tangent description: > @@ -898,7 +898,7 @@ Num.tanh: example: | >> (0.0).tanh() = 0 - + Num.tgamma: short: "true gamma function" description: > @@ -915,7 +915,7 @@ Num.tgamma: example: | >> (1.0).tgamma() = 1 - + Num.trunc: short: truncate a number description: > @@ -934,7 +934,7 @@ Num.trunc: = 3 >> (-3.7).trunc() = -3 - + Num.y0: short: Bessel function description: > @@ -951,7 +951,7 @@ Num.y0: example: | >> (1.0).y0() = -0.7652 - + Num.y1: short: Bessel function description: > @@ -968,7 +968,7 @@ Num.y1: example: | >> (1.0).y1() = 0.4401 - + Num.1_PI: short: 1/pi diff --git a/api/paths.yaml b/api/paths.yaml index 1bfe5d6d..1e62b250 100644 --- a/api/paths.yaml +++ b/api/paths.yaml @@ -22,7 +22,7 @@ Path.accessed: = 1704221100? >> (./not-a-file).accessed() = none - + Path.append: short: append to a file description: > @@ -48,7 +48,7 @@ Path.append: The permissions to set on the file if it is being created. example: | (./log.txt).append("extra line$(\n)") - + Path.append_bytes: short: append bytes to a file description: > @@ -74,7 +74,7 @@ Path.append_bytes: The permissions to set on the file if it is being created. example: | (./log.txt).append_bytes([104, 105]) - + Path.base_name: short: base name of a file description: > @@ -91,7 +91,7 @@ Path.base_name: example: | >> (./path/to/file.txt).base_name() = "file.txt" - + Path.by_line: short: iterate by line description: > @@ -114,11 +114,11 @@ Path.by_line: say(line.upper()) else say("Couldn't read file!") - + # Assume the file is readable and error if that's not the case: for line in (/dev/stdin).by_line()! say(line.upper()) - + Path.can_execute: short: check execute permissions description: > @@ -139,7 +139,7 @@ Path.can_execute: = no >> (/non/existant/file).can_execute() = no - + Path.can_read: short: check read permissions description: > @@ -160,7 +160,7 @@ Path.can_read: = no >> (/non/existant/file).can_read() = no - + Path.can_write: short: check write permissions description: > @@ -181,7 +181,7 @@ Path.can_write: = no >> (/non/existant/file).can_write() = no - + Path.changed: short: get the last changed time description: > @@ -209,7 +209,7 @@ Path.changed: = 1704221100? >> (./not-a-file).changed() = none - + Path.child: short: append a child to a path description: > @@ -230,7 +230,7 @@ Path.child: example: | >> (./directory).child("file.txt") = (./directory/file.txt) - + Path.children: short: get children of a directory description: > @@ -251,7 +251,7 @@ Path.children: example: | >> (./directory).children(include_hidden=yes) = [".git", "foo.txt"] - + Path.create_directory: short: make a directory description: > @@ -272,7 +272,7 @@ Path.create_directory: The permissions to set on the new directory. example: | (./new_directory).create_directory() - + Path.current_dir: short: get current directory description: > @@ -286,7 +286,7 @@ Path.current_dir: example: | >> Path.current_dir() = (/home/user/tomo) - + Path.exists: short: check if a path exists description: > @@ -303,7 +303,7 @@ Path.exists: example: | >> (/).exists() = yes - + Path.expand_home: short: 'expand ~ to $HOME' description: > @@ -324,7 +324,7 @@ Path.expand_home: = /home/user/foo >> (/foo).expand_home() # No change = /foo - + Path.extension: short: get file extension description: > @@ -354,7 +354,7 @@ Path.extension: = "" >> (./.git).extension() = "" - + Path.files: short: list files in a directory description: > @@ -376,7 +376,7 @@ Path.files: example: | >> (./directory).files(include_hidden=yes) = [(./directory/file1.txt), (./directory/file2.txt)] - + Path.from_components: short: build a path from components description: > @@ -397,7 +397,7 @@ Path.from_components: = ./foo.txt >> Path.from_components(["~", ".local"]) = ~/.local - + Path.glob: short: perform file globbing description: > @@ -439,7 +439,7 @@ Path.glob: # Globs with no matches return an empty list: >> (./*.xxx).glob() = [] - + Path.group: short: get the owning group description: > @@ -491,7 +491,7 @@ Path.has_extension: = yes >> (/foo.tar.gz).has_extension("zip") = no - + Path.is_directory: short: check if a path is a directory description: > @@ -512,10 +512,10 @@ Path.is_directory: example: | >> (./directory/).is_directory() = yes - + >> (./file.txt).is_directory() = no - + Path.is_file: short: check if a path is a file description: > @@ -536,10 +536,10 @@ Path.is_file: example: | >> (./file.txt).is_file() = yes - + >> (./directory/).is_file() = no - + Path.is_socket: short: check if a path is a socket description: > @@ -560,7 +560,7 @@ Path.is_socket: example: | >> (./socket).is_socket() = yes - + Path.is_symlink: short: check if a path is a symbolic link description: > @@ -577,7 +577,7 @@ Path.is_symlink: example: | >> (./link).is_symlink() = yes - + Path.modified: short: get file modification time description: > @@ -602,7 +602,7 @@ Path.modified: = 1704221100? >> (./not-a-file).modified() = none - + Path.owner: short: get file owner description: > @@ -626,7 +626,7 @@ Path.owner: = "root" >> (/non/existent/file).owner() = none - + Path.parent: short: get parent directory description: > @@ -643,7 +643,7 @@ Path.parent: example: | >> (./path/to/file.txt).parent() = (./path/to/) - + Path.read: short: read file contents description: > @@ -663,10 +663,10 @@ Path.read: example: | >> (./hello.txt).read() = "Hello"? - + >> (./nosuchfile.xxx).read() = none - + Path.read_bytes: short: read file contents as bytes description: > @@ -690,10 +690,10 @@ Path.read_bytes: example: | >> (./hello.txt).read() = [72, 101, 108, 108, 111]? - + >> (./nosuchfile.xxx).read() = none - + Path.relative_to: short: apply a relative path to another description: > @@ -714,7 +714,7 @@ Path.relative_to: example: | >> (./path/to/file.txt).relative(relative_to=(./path)) = (./to/file.txt) - + Path.remove: short: remove a file or directory description: > @@ -734,7 +734,7 @@ Path.remove: Whether to ignore errors if the file or directory does not exist. example: | (./file.txt).remove() - + Path.resolved: short: resolve a path description: > @@ -755,10 +755,10 @@ Path.resolved: example: | >> (~/foo).resolved() = (/home/user/foo) - + >> (./path/to/file.txt).resolved(relative_to=(/foo)) = (/foo/path/to/file.txt) - + Path.set_owner: short: set the owner description: > @@ -811,7 +811,7 @@ Path.sibling: example: | >> (/foo/baz).sibling("doop") = (/foo/doop) - + Path.subdirectories: short: get subdirectories description: > @@ -832,10 +832,10 @@ Path.subdirectories: example: | >> (./directory).subdirectories() = [(./directory/subdir1), (./directory/subdir2)] - + >> (./directory).subdirectories(include_hidden=yes) = [(./directory/.git), (./directory/subdir1), (./directory/subdir2)] - + Path.unique_directory: short: create a directory with a unique name description: > @@ -855,7 +855,7 @@ Path.unique_directory: >> created.is_directory() = yes created.remove() - + Path.write: short: write to a file description: > @@ -881,7 +881,7 @@ Path.write: The permissions to set on the file if it is created. example: | (./file.txt).write("Hello, world!") - + Path.write_bytes: short: write bytes to a file description: > @@ -907,7 +907,7 @@ Path.write_bytes: The permissions to set on the file if it is created. example: | (./file.txt).write_bytes([104, 105]) - + Path.write_unique: short: write to a uniquely named file description: > @@ -934,7 +934,7 @@ Path.write_unique: >> created.read() = "Hello, world!" created.remove() - + Path.write_unique_bytes: short: write bytes to a uniquely named file description: > @@ -961,4 +961,4 @@ Path.write_unique_bytes: >> created.read() = [1, 2, 3] created.remove() - + diff --git a/api/sets.yaml b/api/sets.yaml index 08111932..7621db9d 100644 --- a/api/sets.yaml +++ b/api/sets.yaml @@ -17,7 +17,7 @@ Set.add: The item to add to the set. example: | >> nums.add(42) - + Set.add_all: short: add items to a set description: > @@ -37,7 +37,7 @@ Set.add_all: The list of items to add to the set. example: | >> nums.add_all([1, 2, 3]) - + Set.clear: short: clear a set description: > @@ -53,7 +53,7 @@ Set.clear: The mutable reference to the set. example: | >> nums.clear() - + Set.has: short: check if a set has an item description: > @@ -74,7 +74,7 @@ Set.has: example: | >> |10, 20|.has(20) = yes - + Set.is_subset_of: short: check if a set is a subset description: > @@ -100,7 +100,7 @@ Set.is_subset_of: example: | >> |1, 2|.is_subset_of(|1, 2, 3|) = yes - + Set.is_superset_of: short: check if a set is a superset description: > @@ -126,7 +126,7 @@ Set.is_superset_of: example: | >> |1, 2, 3|.is_superset_of(|1, 2|) = yes - + Set.overlap: short: set intersection description: > @@ -147,7 +147,7 @@ Set.overlap: example: | >> |1, 2|.overlap(|2, 3|) = |2| - + Set.remove: short: remove an item from a set description: > @@ -167,7 +167,7 @@ Set.remove: The item to remove from the set. example: | >> nums.remove(42) - + Set.remove_all: short: remove items from a set description: > @@ -187,7 +187,7 @@ Set.remove_all: The list of items to remove from the set. example: | >> nums.remove_all([1, 2, 3]) - + Set.with: short: set union description: > @@ -208,7 +208,7 @@ Set.with: example: | >> |1, 2|.with(|2, 3|) = |1, 2, 3| - + Set.without: short: set difference description: > diff --git a/api/tables.yaml b/api/tables.yaml index f3b648da..46f45db9 100644 --- a/api/tables.yaml +++ b/api/tables.yaml @@ -13,7 +13,7 @@ Table.clear: The reference to the table. example: | >> t.clear() - + Table.get: short: get an item from a table description: > @@ -37,16 +37,16 @@ Table.get: >> t := {"A"=1, "B"=2} >> t.get("A") = 1? - + >> t.get("????") = none - + >> t.get("A")! = 1 - + >> t.get("????") or 0 = 0 - + Table.get_or_set: short: get an item or set a default if absent description: > @@ -86,7 +86,7 @@ Table.get_or_set: = @[0, 0, 0] >> t = &{"A"=@[1, 2, 3, 4], "B"=@[99], "C"=@[0, 0, 0]} - + Table.has: short: check for a key description: > @@ -109,7 +109,7 @@ Table.has: = yes >> {"A"=1, "B"=2}.has("xxx") = no - + Table.remove: short: remove a table entry description: > @@ -132,7 +132,7 @@ Table.remove: t.remove("A") >> t = {"B"=2} - + Table.set: short: set a table entry description: > @@ -159,7 +159,7 @@ Table.set: t.set("C", 3) >> t = {"A"=1, "B"=2, "C"=3} - + Table.with_fallback: short: return a table with a new fallback description: > |
