[Info-vax] Text processing on VMS
Arne Vajhøj
arne at vajhoej.dk
Sun Oct 13 20:47:11 EDT 2024
> $ type s.groovy
> import java.nio.file.*
>
> Files.lines(Paths.get("login.com"))
> .filter(line -> line.contains("java"))
> .map(line -> line[2..12])
> .forEach(System.out::println)
Note that it is probably more groovysk with:
$ type s2.groovy
import java.nio.file.*
Files.lines(Paths.get("login.com"))
.filter({ it.contains("java") })
.map({ it[2..12] })
.forEach({ println(it) })
But I don't think that improves readability.
Arne
More information about the Info-vax
mailing list