Mercurial > hg > Members > nobuyasu > scala
comparison chapter7/filter.scala @ 0:b316eec6fa7a draft default tip
add sample files
author | Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 08 Jan 2013 16:41:46 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:b316eec6fa7a |
---|---|
1 val filesHere = (new java.io.File(".")).listFiles | |
2 for (file <- filesHere if file.getName.endsWith(".scala")) | |
3 println(file) | |
4 | |
5 for (file <- filesHere) | |
6 if (file.getName.endsWith(".scala")) | |
7 println(file) | |
8 | |
9 for ( | |
10 file <- filesHere | |
11 if file.isFile; | |
12 if file.getName.endsWith(".scala") | |
13 ) println(file) |