Skip to main content
Last updated

Object operators

at

pact
(at k o)
pact
(at k o)
  • takes k: string
  • takes o: object
  • produces a
pact
(at i l)
pact
(at i l)
  • takes i: integer
  • takes o: list
  • produces bool

projection

Supported in either invariants or properties.

+

pact
(+ x y)
pact
(+ x y)
  • takes x: object
  • takes y: object
  • produces object

Object merge

Supported in either invariants or properties.

drop

pact
(drop keys o)
pact
(drop keys o)
  • takes keys: [string]
  • takes o: object
  • produces object

drop entries having the specified keys from an object

Supported in either invariants or properties.

take

pact
(take keys o)
pact
(take keys o)
  • takes keys: [string]
  • takes o: object
  • produces object

take entries having the specified keys from an object

Supported in either invariants or properties.

length

pact
(length o)
pact
(length o)
  • takes o: object
  • produces integer

the number of key-value pairs in the object

Supported in either invariants or properties.