class Friends
let env: Env
var message: String
new create(env': Env) =>
env = env'
message = ""
fun ref wai(): Friends =>
message = message.add("わーい\n")
this
fun ref sugoi(): Friends =>
message = message.add("すごーい\n")
this
fun ref tanoshii(): Friends =>
message = message.add("たのしー\n")
this
fun ref friends(skill: String): Friends =>
message = message.add("君は" + consume skill + "がとくいなフレンズなんだね!!")
this
fun string(): String =>
message
actor Main
new create(env: Env) =>
env.out.print(Friends(env).wai().sugoi().tanoshii().friends("クソリプ").string())
More than 5 years have passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme