Created
October 24, 2020 14:03
-
-
Save otobrglez/5e7421354b3b245cc45a98e449e1797d to your computer and use it in GitHub Desktop.
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
// Live is to short to not have fun. | |
// Oto Brglez | |
// @otobrglez | |
object Main extends App { | |
type `π°` = String | |
type `π¨βπΌ` = `π°` | |
type `π―` = Int | |
val (`nπ`: `π°`, `sπ½`: `π°`) = ("\n", " ") | |
val `π`: (`π¨βπΌ`, `π°`) => `π°` = { (`πΆ`, `π`) => | |
val s = List(`π`, `πΆ`, `π`) | |
.zip(3 :: 1 :: 3 :: Nil) | |
.map { case (`aπ¨`: `π°`, `bπ¦`: `π―`) => (`aπ¨` + `sπ½`) * `bπ¦` } | |
.mkString(`sπ½`) | |
(`π` * (s.length / 2) :: s :: `π` * (s.length / 2) :: Nil) | |
.mkString(`nπ`) | |
} | |
print(`π`("hello!", "π°")) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment