This code snippet shows how to override compiler options when using Gradle plugins. In addition, it shows how to configure local Maven repositories to resolve locally published dependencies (helpful in the context of local testing with snapshots).
Update build.gradle
Add the following section after plugins section of build.gradle.
allprojects {
// test is for compatibility with Metals import
if (!plugins.hasPlugin("bloop")) {
apply plugin: "bloop"
}
}
Update
The problem of Inverting a Binary Tree has got some hype after following tweet.
Google: 90% of our engineers use the software you wrote (Homebrew), but you can’t invert a binary tree
Given a set represented as a String, we can compute its powerset using foldLeft, as shown below.
def powerset(s: String) =
s.foldLeft(Set("")) {
case (acc, x) => acc ++ acc.map(