Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

F#

  [1..4]
  |> List.filter(fun x ->  (x % 2) = 0)
C#

  using System.Collections.Generic;
   public static class Foo {
    public static void Main(string[] args){
      Enumerable.Range(1,4).Where(x => (x % 2) == 0); 
   } 
  }


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: