method sink

Documentation for method sink assembled from the following types:

class List

From List

(List) method sink

Defined as:

method sink(--> Nil{ }

It does nothing, and returns Nil, as the definition clearly shows.

sink [1,2,Failure.new("boo!"),"still here"]; # OUTPUT: «» 

class Proc

From Proc

(Proc) method sink

method sink(--> Nil)

When sunk, the Proc object will throw X::Proc::Unsuccessful if the process it ran exited unsuccessfully.

class Seq

From Seq

(Seq) method sink

Defined as:

method sink(--> Nil)

Calls sink-all if it is an Iterator, sink if the Sequence is a list.

say (1 ... 1000).sink# OUTPUT: «Nil␤» 

This is something you might want to do for the side effects of producing those values.