( ꒪⌓꒪) ゆるよろ日記

( ゚∀゚)o彡°オパーイ!オパーイ! ( ;゚皿゚)ノシΣ フィンギィィーーッ!!!

Scalazを簡単に試してみるための"scalaz-playground"というプロジェクトを作った

yuroyoro/scalaz-playground · GitHub

タイトルの通りで、このリポジトリをcloneして、"sbt console"と入力汁。

ozaki@mbp-4 $ git clone https://github.com/yuroyoro/scalaz-playground.git                                                                                                          [~/sandbox/.../yuroyoro/work] 
Cloning into 'scalaz-playground'...
remote: Counting objects: 7, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 7 (delta 0), reused 7 (delta 0)
Unpacking objects: 100% (7/7), done.
ozaki@mbp-4 $ cd scalaz-playground/                                                                                                                                                [~/sandbox/.../yuroyoro/work] 
ozaki@mbp-4 $ sbt clone                                                                                                                                     (git)-[master][~/sandbox/.../work/scalaz-playground] 
Picked up _JAVA_OPTIONS: -Dfile.encoding=UTF-8
ozaki@mbp-4 $ sbt console                                                                                                                                   (git)-[master][~/sandbox/.../work/scalaz-playground] 
Picked up _JAVA_OPTIONS: -Dfile.encoding=UTF-8
[info] Loading project definition from /Users/ozaki/dev/Project/sandbox/scala/yuroyoro/work/scalaz-playground/project
[info] Updating {file:/Users/ozaki/dev/Project/sandbox/scala/yuroyoro/work/scalaz-playground/project/}default-48e6aa...
[info] Done updating.
[info] Set current project to scalaz playground (in build file:/Users/ozaki/dev/Project/sandbox/scala/yuroyoro/work/scalaz-playground/)
[info] Updating {file:/Users/ozaki/dev/Project/sandbox/scala/yuroyoro/work/scalaz-playground/}default-2e3acd...
[info] Done updating.
[info] Starting scala interpreter...
[info] 
import scalaz._
import Scalaz._
Welcome to Scala version 2.9.1.final (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_29).
Type in expressions to have them evaluated.
Type :help for more information.

scala> false !? Option("あばばばばば")
res1: Option[java.lang.String] = Some(あばばばばば)

scala> false ?? Option("あばばばばば")
res2: Option[java.lang.String] = None