gt() function
最初の引数が 2 番目の引数より大きい場合は true を返し、それ以外の場合は false を返します。
Signature:
typescript
declare function gt(a: string): (b: string) => boolean;Example
ts
gt(5, 1); // expected true
gt(1, 5); // expected false
gt("a", "b"); // expected false
gt("b", "a"); // expected true
filter(gt(5), [1, 2, 4, 5, 8, 9]); // Iterable<[1, 2, 4]>
filter(gt(1), [1, 2, 3, 4, 5]); // Iterable<[]>
filter(gt("b"), ["a", "b", "c"]); // Iterable<["a"]>
filter(gt("a"), ["a", "b"]); // Itreable<[]>