MarisaKirisame opened a new issue #4909: [RFC][Relay] Change the name of filter 
to select.
URL: https://github.com/apache/incubator-tvm/issues/4909
 
 
   A few days ago I was looking at the Relay prelude, and I found the following 
function definition:
   ```
   /*
    * Filters a list, returning a sublist of only the values which satisfy the 
given predicate.
    */
    @filter[A](%f: fn(A) -> Tensor[(), bool], %xs: List[A]) -> List[A] {
     match (%xs) {
       Cons(%x, %rest) => {
         if (%f(%x)) {
           Cons(%x, @filter(%f, %rest))
         } else {
           @filter(%f, %rest)
         }
       },
       Nil => Nil,
     }
   }
   ```
   The name "filter" doesnt signal whether it filter in (accepting value in the 
predicate) (select) or filter out (rejecting value in the predicate) (reject). 
While this is a common functional programming convention that filter mean 
"filter in (select)", a lot of ppl in tvm are not familiar with those language, 
and filter only add mental overhead.
   So, I propose to change the name to select.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to