Advertisement
rotrevrep

play with linq

Aug 2nd, 2013
345
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Vala 0.42 KB | None | 0 0
  1. using Mee;
  2. using Mee.Linq;
  3.  
  4. void main(string[] args){
  5.     long[] array = new long[]{3738,6738,6728,6298,672,376};
  6.     Query<long> query = Query.from<long>(array)
  7.                             .where<long>( l => { return l.to_string().contains("7"); })
  8.                             .select<long>( l => { return l/2; })
  9.                             .reverse();
  10.     foreach(long l in query)
  11.         stdout.printf("%ld\n",l);
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement