Skip to content

Instantly share code, notes, and snippets.

View martinloverse's full-sized avatar

すやまいくお martinloverse

View GitHub Profile
@martinloverse
martinloverse / ForComprehensionSamples.scala
Created March 20, 2017 17:29
Scala For Comprehension Samples
import scala.concurrent.Future
val maybeName: Option[String] = Some("martin.lover")
val maybeAge: Option[Int] = Some(33)
case class Person(name:String, age:Int)
val person: Option[Person] =
for {
name <- maybeName
@martinloverse
martinloverse / build.sbt
Created March 20, 2017 17:28
sbt - sbt-native-packager sample
name := "scala-for-work"
// 共通設定
lazy val commonSettings = Seq(
organization := "io.martin.lover",
version := "0.1.0",
scalaVersion := "2.12.1",
// SBT Consoleでサブプロジェクトの名前を表示
shellPrompt := { s =>
@martinloverse
martinloverse / build.sbt
Created March 19, 2017 17:12
sbt - Multi Project build.sbt sample
name := "scala-for-work"
// 共通設定
lazy val commonSettings = Seq(
organization := "io.martin.lover",
version := "0.1.0",
scalaVersion := "2.12.1",
// SBT Consoleでサブプロジェクトの名前を表示
shellPrompt := { s =>