Abbreviations, simple: Difference between revisions

No edit summary
Line 1,707:
""".stripMargin.replace("\n", " ").trim.split(" ")
 
val commadWithMinLengths = commands.sliding(2, 1).filter(window => window.length > 1 && Try(window(0).toInt).toOption.isEmpty).map(w => (w(0), Try(w(1).toInt).toOption.getOrElse(0))).toList
.filter{ window =>
window.length > 1 && Try(window(0).toInt).toOption.isEmpty
}
.map(w => (w(0), Try(w(1).toInt).toOption.getOrElse(0)))
.toList
 
val input = "riG rePEAT copies put mo rest types fup. 6 poweRin".split(" ").filter(!_.isEmpty)
Anonymous user