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
sealed trait Interact[A] | |
case class Ask(prompt: String) | |
extends Interact[String] | |
case class Tell(msg: String) | |
extends Interact[Unit] | |
trait Monad[M[_]] { | |
def pure[A](a: A): M[A] |
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
<stephenjudkins> luft: SBT can do anything, it's turing-complete | |
<stephenjudkins> there are examples of SBT tasks that generate scala source code | |
<dobblego> sbt is turing-complete? what does this mean? | |
<mapreduce> It can use an infinite amount of tape. | |
<stephenjudkins> luft: see https://github.com/twitter/sbt-scrooge | |
<dobblego> what does it mean specifically for sbt to be turing-complete? | |
<stephenjudkins> dobblego: use your imagination, and don't pick fights | |
<dobblego> jesus christ you are sook | |
<dobblego> it's a fucking question | |
<dobblego> can you tell me what it means please? |
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 Imp[T] {} | |
object Imp { | |
implicit val i = new Imp[Int] {} | |
} | |
import Imp._ | |
trait F { | |
type T |
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
object Sort extends App { | |
//val toCells = (_: String).trim.split(" +") | |
//val input = io.Source.stdin.getLines.toList.map(toCells).foreach{line => } | |
val input = List("car", "truck", "8", "4", "bus", "6", "1") | |
val (matches, mismatches) = input.partition(_.matches("""\d+""")) | |
} |