simon.vergauwen
12/23/2018, 12:53 PMfun tests(start: Int, end: Int): IntArray =
(start until end).toList().toIntArray()
raulraja
12/27/2018, 12:26 PMimport arrow.data.NonEmptyList
fun <A> NonEmptyList<A>.firstRest(): Pair<A, List<A>> =
head to tail
fun <A> Iterable<A>.firstRest(): Pair<A?, List<A>> =
firstOrNull() to drop(1)
pakoito
12/29/2018, 10:52 PMpajatopmr
12/31/2018, 8:37 AMraulraja
01/04/2019, 11:46 PMRruiz
01/23/2019, 4:42 PMDalinar
01/29/2019, 11:27 AMmapA
is a mapOf<String,AnsiColor>()
and mapB<String,AnsiColor>
needs to be mapped from set1<String>
in the way that mapB
entries are constructed from set1
String
element to AnsiColor.GREEN
(this is a constant)Dalinar
02/13/2019, 3:19 PMCompletableFuture.supplyAsync(Supplier<Boolean>{
true
}, pool)
so if I want the , pool
then I need to use Supplier<>
? there is no way to get of it ? I'm asking because if you only supply one parameter then it is not necessarypakoito
02/21/2019, 6:35 AMpakoito
02/21/2019, 6:36 AMUberto Barbini
04/06/2019, 2:58 PMraulraja
04/16/2019, 10:43 AMAlex
06/13/2019, 9:00 PMraulraja
06/13/2019, 9:07 PMpakoito
07/02/2019, 12:23 AMtschuchort
09/13/2019, 3:14 PMthanh
10/08/2019, 10:00 AMsimon.vergauwen
10/08/2019, 10:13 AMpawegio
10/09/2019, 6:46 AMHexa
10/17/2019, 8:46 PMfun main(args : Array<String>) {
val input = Scanner(System.`in`)
while (true) {
var currentMax =0;
var iWithCurrentMax =0;
for (i in 0 until 8) {
val mountainH = input.nextInt()
if(mountainH >currentMax){
currentMax = mountainH;
iWithCurrentMax = i;
}
}
println(iWithCurrentMax)
}
}
Hexa
10/18/2019, 7:34 AMMohamed Ibrahim
10/22/2019, 7:26 AMraulraja
11/04/2019, 1:33 AMtschuchort
11/18/2019, 3:56 PMtschuchort
11/20/2019, 12:07 PMjavaru
12/02/2019, 7:47 PMmap
lambda by simply not mapping a value for when the exception happens? I"m currently adding null
to the stream, then filtering out the nulls at the end. Is this the best and most idomatic way to handle this case?
fun parseList(strings: Collection<String>): List<Foo>
{
return strings.stream().map {
try {
parse(it)
} catch (e: Exception) {
null
}
}.toList().filterNotNull()
}
thanerian
12/16/2019, 12:10 PMCodecriticon
12/17/2019, 11:20 AMgian
12/18/2019, 10:26 AMAtanas Ladzhov
12/19/2019, 6:35 PMAtanas Ladzhov
12/19/2019, 6:35 PMPhBastiani
12/19/2019, 7:47 PMSalves
12/21/2019, 3:51 PMzhuinden
01/03/2020, 12:46 PM