- CARTA HOLDINGS(旧VOYAGE GROUP)
- 技術広報が新卒研修<Open AIハッカソン>をスパイしてみた - (2023/04/11)
- @t_wadaに学ぶテスト駆動開発【CARTA 23新卒研修】 - (2023/04/19)
- 【新卒研修】監修者@t_wadaと読む!プログラマが知るべき97のこと読書会 - (2024/04/09)
- Classi
- 当たり前にリリースしていく ~ 新卒研修編 - (2021/05/20)
- リモートワークのための質問力向上研修を実施しました - (2021/12/07)
- CyberZ
- 良いコードとは何か - エンジニア新卒研修 スライド公開 - (2021/04/27)
This file contains hidden or 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
Welcome to the Ammonite Repl 0.8.0 | |
(Scala 2.11.8 Java 1.8.0_91) | |
@ import scala.util.Try | |
import scala.util.Try | |
@ val listOfTries: List[Try[String]] = List(Try("a"), Try("b"), Try("c")) | |
listOfTries: List[Try[String]] = List(Success("a"), Success("b"), Success("c")) | |
// I have a List[Try[String]] but I actually want a Try[List[String]]. |
例文を組み込んだAlfred Workflowを作りました: Alfred Git Commit Message Example
以下転載:
2015/07/24 関数型Scalaの集い
- 中村 学
- @gakuzzzz
- 株式会社 Tech to Value
- Scala関西 Summit 2015 スポンサーしてます
This file contains hidden or 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 RetryUtil { | |
case class RetryException(throwables: List[Throwable]) extends Exception | |
def retry[T](retryLimit: Int, retryInterval: Int, shouldCatch: Throwable => Boolean)(f: => T): T = { | |
// @annotation.tailrec | |
def _retry( errors: List[Throwable], f: => T):T = { | |
try { | |
f | |
} catch { |
This file contains hidden or 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
case class RetryException(throwables: List[Throwable]) extends Exception(throwables.toString()) | |
object RetryUtil { | |
import scala.util.control.Exception.allCatch | |
def retry[T](retryLimit: Int)(f: => T): T = | |
retry(retryLimit, 0, classOf[Throwable])(f) |