Instantly share code, notes, and snippets.

What would you like to do?
// روش معمول
fun makeDir(path: String): File {
val result = File(path)
return result
// روش بهبودیافته
fun makeDir(path: String) = path.let{ File(it) }.also{ it.mkdirs() }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment