This commit is contained in:
Alexander Gehrke 2021-12-05 17:25:44 +01:00
parent d4d3bcb0b2
commit a1ff448d58
4 changed files with 659 additions and 1 deletions

View file

@ -19,5 +19,8 @@ extension (s: String)
case Array(a, b) => Some((a.nn, b.nn))
case _ => None
def splitNN(regex: String): List[String] =
s.split(regex).nn.map(_.nn).toList
extension [K,V,W](map: Map[K,V])
def mapValuesS(f: V => W): Map[K, W] = map.view.mapValues(f).toMap