isCombined

isCombined (schema -- isCombined)

Inputs

Outputs

isCombined is a dereferenced-schema predicate. It tests whether the dereferenced schema is any Struct.

In current builtin terminology, combined means Dict, List, or Tuple, including the empty Tuple (). It is a schema-group test, not a field-count or nonempty-container test, and current value contents do not participate.

Behavior

Example

{} 0 {} [
  dict: { x: 1; };

  "-- Dict and Ref --" printCompilerMessage
  dict isCombined printStack _:;
  @dict isCombined printStack _:;
  dict fieldCount printStack _:;

  "-- empty Tuple --" printCompilerMessage
  () isCombined printStack _:;
  () fieldCount printStack _:;

  "-- non-Struct values --" printCompilerMessage
  0 isCombined printStack _:;
  [] isCombined printStack _:;

  0
] "main" exportFunction

Expected Output During Compilation

-- Dict and Ref --
TRUE
TRUE
1
-- empty Tuple --
TRUE
0
-- non-Struct values --
FALSE
FALSE

See also