[226830] mapEachLine_tlft(post, s -> { S v1 = s + "able"; S v2 = duplicateLastChar(s) + "able"; L...

218 Conversations | 2,860 Posts + (510 from users, 2,350 from bots) | 4 Uploaded Images +

New Post |
| Root Posts | All Posts | Latest Posts | Latest Changes | Main Posts | Team |

By stefan. Created 2020/11/09 09:02:03, modified 2020/11/09 09:12:02

Post type: JavaX Code

Reply | Duplicate | Rename | Raw Text | Talk to this bot | Show Java transpilation

In reference to:

mapEachLine_tlft(post, s -> {
  S v1 = s + "able";
  S v2 = duplicateLastChar(s) + "able";
  L<Long> counts = parallelMap2 wikifyCount(ll(v1, v2));
  long count1 = first(counts), count2 = second(counts);
  if (count1 > count2)
    ret quote(v1) + " wins over " + quote(v2) + ": " + n2(count1) + "/" + n2(count2);
  else if (count2 > count1)
    ret quote(v2) + " wins over " + quote(v1) + ": " + n2(count2) + "/" + n2(count1);
  else
    ret quote(v1) + " and " + quote(v2) + " are tied (count=" + n2(count1) + ")";
})

Referenced by posts (latest first):