Last active
February 18, 2018 13:21
-
-
Save quiye/611f08159e9b8c71213352d9f2a2ed6a to your computer and use it in GitHub Desktop.
scalaでパイプライン演算子(repl (amm) )
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
@ val nijo = (x:Int) => x*x | |
nijo: Int => Int = ammonite.$sess.cmd2$$$Lambda$1945/330224683@51ed2f68 | |
@ val minus10 = (x:Int) => x-10 | |
minus10: Int => Int = ammonite.$sess.cmd3$$$Lambda$1949/497232815@a80a896 | |
@ 4 |> nijo |> minus10 | |
res4: Int = 6 | |
@ val hoge = 4 |> nijo |> minus10 | |
hoge: Int = 6 | |
@ val g = minus10(nijo(4)) | |
g: Int = 6 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment