This blog post series has moved here.
You might also be interested in the 2016 version.
module Main where | |
import Debug.Trace | |
import Data.Tuple | |
import Data.Either | |
import Data.Lazy | |
class Memo a where | |
memo :: forall r. (a -> r) -> a -> Lazy r |
This blog post series has moved here.
You might also be interested in the 2016 version.
package controllers.util | |
import play.api.mvc.{Result, Controller} | |
import play.api.data.Form | |
import scala.util.Either.RightProjection | |
object Implicits { | |
implicit def formToEither[A](form: Form[A]): Either[Form[A], A] = form.fold(Left.apply, Right.apply) |
Controller
のメソッド引数に Optional<ID<User>>
のような Generic な独自型を指定したい。
Validation
と連携したい。-parameters
を使用して、
Controller
メソッドの引数名からRequest Parameter名やPathParameter名を解決したい。
import java.util.function.Function; | |
import java.util.*; | |
public class DB { | |
static void println(String s) { System.out.println(s); } | |
// java.sql.Connection | |
static class Connection implements AutoCloseable { | |
@Override public void close() { println("closed"); } | |
} |
スタートアップ企業 Silk が、Haskellを採用した理由。
http://engineering.silk.co/post/31920990633/why-we-use-haskell
As a newly started company, we have a lot of technical decisions to make. One of the important ones is the choice of a programming language. Since we’re building a web application, this goes for both the client (i.e. the web browser) and the server.
新しく始めた会社として、我々はたくさんの技術的決定を行わなければなりません。中でも重要なのは、プログラミング言語の選択です。我々はウェブアプリケーションを作っていたので、この選択がクライアント(Webブラウザなど)とサーバの両方で必要になります。
On the client, there wasn’t much discussion. Javascript is the only viable choice, unless you want to use Flash or similar plugin-based models. But on the server, we had more freedom. Popular choices for web applications are dynamically typed languages like Ruby, Python and PHP, and statically typed languages like Java and C#.
libraryDependencies += "org.scalaz" %% "scalaz-core" % "7.1.3" |