Created
September 16, 2018 12:57
-
-
Save sajjadyousefnia/7e5b38a1eea899dd3438e14259e351b3 to your computer and use it in GitHub Desktop.
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
fun calCircumference(radius: Double) = (2 * Math.PI) * radius | |
fun calArea(radius: Double): Double = (Math.PI) * Math.pow(radius, 2.0) | |
fun circleOperation(radius: Double, op: (Double) -> Double): Double { | |
val result = op(radius) | |
return result | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment