Skip to content

Commit eb7b786

Browse files
authored
Add explicit example of how to test the Promise status
1 parent 3fcedd3 commit eb7b786

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

doc/Type/Promise.pod6

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,9 @@ C<Planned>.
208208
209209
method status(Promise:D) returns PromiseStatus
210210
211-
Returns the current state of the promise: C<Kept>, C<Broken> or C<Planned>.
211+
Returns the current state of the promise: C<Kept>, C<Broken> or C<Planned>:
212+
213+
say "promise got Kept" if $promise.status ~~ Kept;
212214
213215
=head2 method scheduler
214216

0 commit comments

Comments
 (0)