areSame

areSame, function

def process areSame(value: any): boolean

Returns true when all values in value are equal. For an empty group, it returns true.

Examples

table T = with
  [| as A, as B |]
  [| 1,   "a"   |]
  [| 1,   "a"   |]
  [| 2,   "b"   |]
  [| 3,   "b"   |]
  [| 4,   "c"   |]

table G[gdim] = by T.B

show table "Same by group" with
  gdim
  areSame(T.A)
  group by gdim

Output:

gdim areSame(T.A)
a true
b false
c true

See also

User Contributed Notes
0 notes + add a note