Delete a turtle

destroy

Terminates and removes a turtle for which the instruction is called. Can be called at any level of nested functions as well as by another turtle using the member acces operator @. It is not allowed to call destroy for the turtle #first.

Example:

;create a parallel turtle:
"t := anewt ["tick := timer [(print who :iter)] 300]

wait 1000
(print who "stops)
destroy @ :t

Output:

t1 1
t1 2
t1 3
t1 4
first stops

See also:

Turtle - object

Table of Content