Skip to main content
added 9 characters in body
Source Link
Dan Bron
  • 28.5k
  • 17
  • 102
  • 139

To keep only those elements which match a predicate, you'd normally say "select""select" ("Give me the positive integers, and I will selectselect the primesprimes").

Both "filter" and "sift" (the verb corresponding to the noun "sieve"), as verbs, refer to the act (of separating wheat from chaff), not the result. When these words are used to describe or characterize results, they both can and have been applied to the parts kept (the wheat), and the parts discarded (the chaff).

If you specifically say "filter out", you are describing the elements you removed (discarded); if you say "filter for", you are describing the elements you retained (kept).

Note that I personally have not encountered "sieve" as a verb, only as a noun, and I would not say "sieve the primes". If I wanted to use "sieve" verbally, I would say "sift", as in "sift the integers for primes" (AmE, American Northeast).

To keep only those elements which match a predicate, you'd normally say "select" ("Give me the positive integers, and I will select the primes).

Both "filter" and "sift" (the verb corresponding to the noun "sieve"), as verbs, refer to the act (of separating wheat from chaff), not the result. When these words are used to describe or characterize results, they both can and have been applied to the parts kept (the wheat), and the parts discarded (the chaff).

If you specifically say "filter out", you are describing the elements you removed (discarded); if you say "filter for", you are describing the elements you retained (kept).

To keep only those elements which match a predicate, you'd normally say "select" ("Give me the positive integers, and I will select the primes").

Both "filter" and "sieve", as verbs, refer to the act (of separating wheat from chaff), not the result. When these words are used to describe or characterize results, they both can and have been applied to the parts kept (the wheat), and the parts discarded (the chaff).

If you specifically say "filter out", you are describing the elements you removed (discarded); if you say "filter for", you are describing the elements you retained (kept).

Note that I personally have not encountered "sieve" as a verb, only as a noun, and I would not say "sieve the primes". If I wanted to use "sieve" verbally, I would say "sift", as in "sift the integers for primes" (AmE, American Northeast).

added 3 characters in body
Source Link
Dan Bron
  • 28.5k
  • 17
  • 102
  • 139

To keep only those elements thatwhich match a predicate, you'd normally say "select" ("Give me the positive integers, and I will select the primes).

Both "filter" and "sift" (the verb corresponding to the noun "sieve"), as verbs, refer to the act (of separatingseparating wheat from chaff), not the result. When these words are used to describe or characterize results, they both can and have been applied to the parts kept (the wheat), and the parts discarded (the chaff).

If you specifically say "filter out", thoseyou are describing the elements you removed (discarded); if you say "filter for", thoseyou are hedescribing the elements you keptretained (kept).

To keep only those elements that match a predicate, you'd normally say "select" ("Give me the positive integers, and I will select the primes).

Both "filter" and "sift" (the verb corresponding to the noun "sieve"), as verbs, refer to the act (of separating wheat from chaff), not the result. When these words are used to describe or characterize results, they both can and have been applied to the parts kept (the wheat), and the parts discarded (the chaff).

If you specifically say "filter out", those are the elements you removed (discarded); if you say "filter for", those are he elements you kept.

To keep only those elements which match a predicate, you'd normally say "select" ("Give me the positive integers, and I will select the primes).

Both "filter" and "sift" (the verb corresponding to the noun "sieve"), as verbs, refer to the act (of separating wheat from chaff), not the result. When these words are used to describe or characterize results, they both can and have been applied to the parts kept (the wheat), and the parts discarded (the chaff).

If you specifically say "filter out", you are describing the elements you removed (discarded); if you say "filter for", you are describing the elements you retained (kept).

Source Link
Dan Bron
  • 28.5k
  • 17
  • 102
  • 139

To keep only those elements that match a predicate, you'd normally say "select" ("Give me the positive integers, and I will select the primes).

Both "filter" and "sift" (the verb corresponding to the noun "sieve"), as verbs, refer to the act (of separating wheat from chaff), not the result. When these words are used to describe or characterize results, they both can and have been applied to the parts kept (the wheat), and the parts discarded (the chaff).

If you specifically say "filter out", those are the elements you removed (discarded); if you say "filter for", those are he elements you kept.