Skip to content

Instantly share code, notes, and snippets.

@ha1f
Last active Jul 11, 2018
Embed
What would you like to do?
import Foundation
// import EthereumKit
// import Play
final class Lets {
private let nyanWallet = Wallet("💰")
private let nyan = Haruna("🐈")
func go(to place: String) {
nyan.move(to: place)
}
func to(get item: String) {
let waterMelon = 🍉(price: 1980, to: "0xf2A4f4e6302fbD5E1D312C341557c63247E039c8")
do {
try nyanWallet.buy(waterMelon)
} catch {
fatalError("🍉 is out of stock 😭")
}
}
func andHaveFun(at place: String) {
let subStrings = ["g", "n", "i", "m", "o", "c", "s", "i", "r", "e", "m", "m", "u", "s"]
var body: String = ""
for substring in subStrings.reversed() {
body = body + substring
}
print("Yay let's go to \(place) \(body)😎")
}
func isFakeRight🤔() -> Bool {
return true
}
}
// Hidden part
struct 🍉 {
let price: Int
let to: String
}
struct Wallet {
let rawValue: String
init(_ string: String) {
self.rawValue = string
}
func buy(_ item: 🍉) throws {
// FIXME
}
}
struct Haruna {
let rawValue: String
init(_ string: String) {
self.rawValue = string
}
func move(to place: String) {
// FIXME
}
}
// comments
//
// EthereumKitはこれ?
// https://github.com/D-Technologies/EthereumKit
// Walletのinitializerはあってないのでとりあえず放置
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment