SHARE
TWEET

Untitled

a guest Aug 19th, 2019 169 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. fun perimeter(shape: Shape): Double = when (shape) {
  2.   is Rectangle -> (shape.x + shape.y) * 2
  3.   is Circle -> 2 * PI * shape.radius
  4. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top