Skip to content

Instantly share code, notes, and snippets.

View jonatasemidio's full-sized avatar

Jonatas Emidio jonatasemidio

View GitHub Profile
interface Buyable {
def buy()
}
class SomeBuyableObject implements Buyable {
String foo
def buy() { //do stuff }
}
class AnotherBuyableObject implements Buyable {
def fizzbuzz(n):
if n % 3 == 0 and n % 5 == 0:
return 'FizzBuzz'
elif n % 3 == 0:
return 'Fizz'
elif n % 5 == 0:
return 'Buzz'
else:
return str(n)