Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is List.where identical to List.filter?

Tags:

f#

I intended to use List.filter but accidentally wrote List.where without noticing (I'm used to LINQ). To my surprise this function seems to actually exist and do the exact same thing as List.filter. However, I couldn't find any documentation on List.where on MSDN.

Are the two functions equivalent?

like image 502
cmeeren Avatar asked Oct 18 '17 11:10

cmeeren


1 Answers

Yes, they're identical; I assume .where's existence is solely for LINQ users who would wonder where it is otherwise.

like image 119
ildjarn Avatar answered Sep 22 '22 01:09

ildjarn