Skip to content

Instantly share code, notes, and snippets.

View Supuhstar's full-sized avatar
👋
Happy to be here

Kyli Rouge Supuhstar

👋
Happy to be here
View GitHub Profile
@Supuhstar
Supuhstar / Pizza.Kt
Created May 22, 2017 11:12
Basic Kotlin
sealed class Topping {
class Pepperoni: Topping()
class Cheese(val type: CheeseType, val extra: Boolean): Topping()
class Sausage(val thickness: Double): Topping()
}
fun Topping.toString(): String {
return when (this) {
is Cheese -> "${extra ? "extra " : ""}$type cheese"
is Pepperoni -> "pepperoni"
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../google-map/google-map.html">
<polymer-element name="my-element">