Links on Must watch talks
-
A Year living Freely - Chris Myers
-
Programs as Values Pure Composable Database Access in Scala. In general each talk from Rob Norris is very useful for learning.
| /** | |
| * |@| is a helper function that helps you accumulate applicative functors. It gives you an ApplicativeBuilder (it's part of | |
| * the implementation though) through which you accumulate your applicatives just as you would using the Builder pattern of | |
| * the GoF in the OO world. Once you have all the applicatives you can pass it a function that will be applied to all the | |
| * values that you have accumulated so far. e.g. | |
| */ | |
| scala> (1.some |@| 2.some) apply {_ + _} | |
| res1: Option[Int] = Some(3) |
| import org.junit.Test; | |
| import java.time.Instant; | |
| import java.time.OffsetDateTime; | |
| import java.time.ZonedDateTime; | |
| import java.time.format.DateTimeParseException; | |
| public class Java8TimeTest { | |
| private String instantFormat = "2007-12-03T10:14:30.000Z"; |
Links on Must watch talks
A Year living Freely - Chris Myers
Programs as Values Pure Composable Database Access in Scala. In general each talk from Rob Norris is very useful for learning.
git remote add upstream https://github.com/whoever/whatever.git
git fetch upstream
| object TwiiterScalaFutureOps { | |
| import TwitterScalaFutureConverters._ | |
| implicit class ScalaToTwitterFuture[T](f: Future[T]) { | |
| def toTwitterFuture: twitter.Future[T] = scalaToTwitterFuture(f) | |
| } | |
| implicit class TwitterToScalaFuture[T](f: twitter.Future[T]) { | |
| def toScalaFuture: Future[T] = twitterToScalaFuture(f) | |
| } |
| // https://twitter.github.io/scala_school/type-basics.html | |
| // 트위터 스칼라 스쿨에 나오는 자료구조를 활용해보겠다. | |
| class Animal { val sound = "rustle" } | |
| class Bird extends Animal { override val sound = "call" } | |
| class Chicken extends Bird { override val sound = "cluck" } | |
| class Duck extends Bird { override val sound = "duck" } | |
| def foo(tweet: Bird => String) = { | |
| tweet(new Bird) |