Skip to content

Instantly share code, notes, and snippets.

@sshark
sshark / fpmax.scala
Created August 22, 2018 17:14 — forked from jdegoes/fpmax.scala
FP to the Max — Code Examples
package fpmax
import scala.util.Try
import scala.io.StdIn.readLine
object App0 {
def main: Unit = {
println("What is your name?")
val name = readLine()
@sshark
sshark / BigFTest.md
Created February 27, 2017 02:37 — forked from danieldietrich/BigFTest.md
Javaslang's Future: Thread creation and ExecutorService usage

Future Test

public class BigFTest {

    public static void main(String[] args) throws Throwable {
        final long sleepMillis = 1500;

        ExecutorService executorService = Executors.newFixedThreadPool(1);
@sshark
sshark / kleisli.scala
Last active June 5, 2016 14:58 — forked from jto/kleisli.scala
For future reference on Kleisli
import scalaz._
import Scalaz._
import scala.concurrent.Future
import scalaz.std.scalaFuture._
import play.api.libs.concurrent.Execution.Implicits._
val f1 = (s: String) => Option("foo").point[Future]
def f2 = (s: String) => Option(1).point[Future]
type OptionTFuture[T] = OptionT[Future, T]