You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/SPECIFICATION.html
+2-4Lines changed: 2 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -699,7 +699,7 @@
699
699
700
700
- `VALUEIN(ANY: value,MAP: map):INT` - Returns `1` if any value stored in `map` is equal to `value` using the language's equality semantics, otherwise `0`.
701
701
702
-
- `MATCH(MAP: map,MAP: template,INT: typing=0):INT` - Returns `1` if every key in `template` is present in `map`. If `typing` is true, also require that for each matching key the stored value types are identical between `map` and `template`; otherwise return `0`.
702
+
- `MATCH(MAP: map,MAP: template,INT: typing=0,INT: recurse=0,INT: shape=0):INT` - Returns `1` if every key in `template` is present in `map`. If `typing` is true, also require that for each matching key the stored value types are identical between `map` and `template`. If `shape` is true, require that for any matching key where either side is a `TNS`, both sides are `TNS` and their shapes are identical. If `recurse` is true, apply these same rules to every `MAP` value nested anywhere within `map` (recursively). On any failure return `0`.
703
703
704
704
- `INV(MAP: map):MAP` - Return a new map whose key/value pairs are reversed. Each value in `map` becomes a key in the returned map and each original key becomes the corresponding value. All values in `map` MUST be scalar (`INT`, `FLT`, or `STR`) so they can be used as keys; otherwise `INV` raises a runtime error. If `map` contains duplicate values (by key type and value), `INV` raises a runtime error.
705
705
@@ -725,9 +725,7 @@
725
725
726
726
### 12.9 Logarithms
727
727
728
-
- `LOG(INT: a):INT` ; floor(log2(a)) for a > 0
729
-
730
-
- `LOG(FLT: a):FLT` ; floor(log2(a)) for a > 0
728
+
- `LOG(INT|FLT: a):INT|FLT` ; floor(log2(a)) for a > 0
0 commit comments