jw
01/02/2016, 5:51 AMjw
01/02/2016, 5:51 AMjw
01/02/2016, 5:52 AMmplatvoet
01/02/2016, 6:54 AMa || b
vs a | b
(with a
and b
being booleans) where one is short-circuit and the other is not.jw
01/02/2016, 6:54 AMvoddan
01/02/2016, 11:26 AMapatrida
01/02/2016, 2:21 PMnatpryce
01/05/2016, 11:31 AMnatpryce
01/05/2016, 11:31 AMvar timeout : Int by AtomicInteger(1000)
kirillrakhman
01/05/2016, 11:35 AMkirillrakhman
01/05/2016, 11:35 AMnatpryce
01/05/2016, 11:40 AMnatpryce
01/05/2016, 11:40 AMkirillrakhman
01/05/2016, 12:42 PMdamian
01/05/2016, 9:27 PMcomponent1() = start
and component2() = endInclusive
extensions for ClosedRange<T>
, IntRange
, etc? I tend to use IntRange
and friends whenever a start/end pair is required, and the omission of destructuring operators seems oddmplatvoet
01/05/2016, 10:47 PMmplatvoet
01/05/2016, 10:50 PMval (a,b,c) = 1..10
where a = 1, b =2 and c =3mplatvoet
01/05/2016, 10:51 PMnatpryce
01/05/2016, 10:53 PMnatpryce
01/05/2016, 10:53 PM10 to 20
natpryce
01/05/2016, 10:54 PMPair<Int,Int>.asRange(): IntRange
could be usefulnatpryce
01/05/2016, 10:55 PMIntRange.limits(): Pair<Int,Int>
natpryce
01/05/2016, 10:55 PMval (a,b) = (1..10).limits()
mplatvoet
01/05/2016, 10:56 PMdamian
01/05/2016, 11:23 PMlimits()
suggestionilya.gorbunov
01/06/2016, 12:42 AMAtomicInteger
usage? I wonder if you're willing to use only get
and set
methods (available with delegation), would @Volatile var
fit better?jw
01/06/2016, 7:13 AMforEach
but as a non-terminal.jw
01/06/2016, 7:13 AMpeek
or onEach
or doOnEach
or something...jw
01/06/2016, 7:16 AMinputDir.walk()
.filter { it.isFile && it.name.endsWith(".txt") }
.peek { println("Moving $it to $outputDir") }
.forEach { moveFile(it, File(outputDir, it.toRelativeString(inputDir))) }
mplatvoet
01/06/2016, 7:40 AM