This file contains 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 com.atlassian.crowd.plugin.usermanagement.rest.controller; | |
import com.atlassian.fugue.Option; | |
import static com.atlassian.crowd.plugin.usermanagement.rest.controller.Visibility.Internal; | |
import static com.atlassian.fugue.Option.some; | |
class Main { | |
public static void main(String[] args) { | |
CreateComment comment1 = CreateComment.build( |
This file contains 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
trait Higher[F[_]] | |
trait Box[A] | |
object Box { | |
implicit def HigherBox = new Higher[Box] {} | |
} | |
object Foo { | |
val box = implicitly[Higher[Box]] // compiles fine !!! |
This file contains 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 com.fayi.ftp | |
object CSVParser { | |
val ADDRESS = "ftp://mirrors.kernel.org/gnu/README.DESCRIPTIONS" | |
val ADDRESS2 = "ftp://ftp.gnu.org/README" | |
def main(args: Array[String]) { | |
def parse(s: Stream[String]) = { | |
val cells = (_: String).split(",") |
This file contains 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
final case class Schrödinger[+A, +B](private a: => A, private b: => B) extends Either[A, B] { | |
private lazy val actual : Either[A, B] = | |
if (new Random().nextBoolean()) | |
Left(a) | |
else | |
Right(b) | |
def isLeft = actual.isLeft | |
def isRight = actual.isRight | |
def left = actual.left |