who-min-of-breed-with
[condition] [list of commands]
Parameters:
[condition] |
List of turtle commands |
An expression that returns a true or false value |
[list of commands] |
List of turtle commands |
A list of commands for the turtles to run which returns a number |
Description:
Returns a list of the turtle with the minimum value of [list of commands] when evaluated across all the turtles of breed frogs
that satisfy the condition (must return a boolean of true or false) specified by the [condition]., and the minimum value.
Examples:
who-min-of-frogs-with [color = red] [energy]
returns a list with the who number of the red frog with the least energy and the smallest energy value: [34 0.4]
.
Notes:
If [list of commands] contains no numbers, an error occurs. If some of the [list of commands], when evaluated, are not numbers, those values are ignored.
If no turtles satisfy [condition], who-min-of-frogs-with
returns [nobody maxnum]
.
When a turtle calls the command, it, itself, is not included as part of the calculation.
Related Commands:
who-max-of-breed-with
who-min-of-breed