lambdacd.step-id

Utility functions to deal with the logic behind step ids: step-ids are a sequence of numbers that represent the structure of the pipeline.

Examples:

  • [1] is the first step of the pipeline
  • [2 1] is the second child of the first step of the pipeline.

For detailed examples on these functions, refer to their tests.

before?

(before? a b)

Returns true if for two steps, the step with id b is executed after a in the pipeline.

child-id

(child-id parent-step-id child-number)

Returns a step id for the child-numberth child of the step with id parent-step-id.

direct-parent-of?

(direct-parent-of? parent child)

Returns true if the steps the given step-ids refer to are parent and immediate child.

later-than?

(later-than? a b)

Returns true if for two steps, the step with id a is executed after b in the pipeline.

parent-of?

(parent-of? parent child)

Returns true if the steps the given step-ids refer to are parent and child.

root-step-id-of

(root-step-id-of step-id)

Returns the id of the root-parent of the step with the given id.

root-step-id?

(root-step-id? step-id)

Returns true if the step-id belongs to a root-step, i.e. a step with no parents.