Goal<T>.test constructor

const Goal<T>.test(
  1. bool success(
    1. T node
    )
)

Creates a goal with an arbitrary condition that a node must meet.

The first node that matches success test is considered the goal.

Implementation

const factory Goal.test(bool Function(T node) success) = _TestGoal<T>;