Carrot reference
Methods

.filter()

Description

This method, called on a List or Sequence, filters the results to only those results that match the expression.

Syntax

.filter{expression}

  • Returns only those objects that match the expression.

Examples

grants.filter{price > 1.50}

  • Of the Grants issued to the current person, only return those stock grants where the strike price is over $1.50.