This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version = "3.5.3" | |
maxColumn = 100 | |
runner.dialect = scala3 | |
style = defaultWithAlign | |
align.openParenCallSite = false | |
align.openParenDefnSite = false | |
continuationIndent.callSite = 2 | |
continuationIndent.defnSite = 2 | |
spaces.inImportCurlyBraces = false | |
project.excludeFilters = [".*\\.sbt"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Given two words, we can determine if they have the same vowels, | |
* ignoring order and repetition. | |
* | |
* For instance, “Hello” and “Vowel” both have \e and \o, so they have the same vowels. | |
* | |
* Write a function that groups words into “families” that all have the same vowels. | |
* “Tree” and “tent” also belong to the same family because we ignore the repetition of \e. | |
* | |
* Examples |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import $scalac.`-Ypartial-unification` | |
import $dep.`org.typelevel::cats-core:2.3.0` | |
import scala.collection.immutable._ | |
import cats.Foldable | |
import cats.implicits._ | |
/** | |
* Balanced Paren Clusters |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* | |
Atbash Cipher | |
The Atbash Cipher is simple: replace every letter with its “mirror” in the alphabet. | |
A is replaced by Z. B is replaced by Y. Etc. Write a function to calculate it. | |
Examples | |
(atbash "") ;=> "" | |
(atbash "hello") ;=> "svool" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val addCurried: Int => Int => Int = (add _).curried | |
print(addCurried(1)(2)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// base function | |
def add(a: Int, b: Int): Int = a + b | |
// curried form | |
def addCurried(a: Int)(b: Int): Int = a + b | |
/** | |
* In scala functions have the method `curried` | |
*/ | |
val addCurriedTwo = (add _).curried |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package me.rafaavila | |
import com.whisk.docker._ | |
trait DockerKafkaService extends DockerKit { | |
def KafkaAdvertisedPort = 9092 | |
val ZookeeperDefaultPort = 2181 | |
lazy val kafkaContainer = DockerContainer("spotify/kafka") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package fpmax | |
import scala.util.Try | |
import scala.io.StdIn.readLine | |
object App0 { | |
def main: Unit = { | |
println("What is your name?") | |
val name = readLine() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to log to the console when each text editor is saved. | |
# | |
# atom.workspace.observeTextEditors (editor) -> | |
# editor.onDidSave -> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// run this in VsCode command palette | |
// F# | |
ext install Ionide.ionide-fsharp | |
ext install Ionide.ionide-fake | |
ext install Ionide.ionide-paket | |
// varia | |
ext install nwolverson.ide-purescript | |
ext install UCL.haskelly |
NewerOlder