I hereby claim:
- I am btdrawer on github.
- I am btdrawer (https://keybase.io/btdrawer) on keybase.
- I have a public key ASAeQqFWikK-LIyGsW_nLZrkFEhda55hXZlwzL77PEzIhAo
To claim this, I am signing this object:
// Example handlers - change this to your own handler functions if necessary | |
const handleSuccess = (res, data) => res.status(200).send(data); | |
const handleError = (res, err) => res.status(400).send(err); | |
// Generic template for requests not covered by other functiomns | |
exports.generic = async (model, func, res, method, ...args) => { | |
try { | |
const obj = await model[func](...args); | |
handleSuccess(res, obj, method); |
object ScalaWorkshopExample extends App { | |
class User(val name: String) { | |
def greet(): Unit = println(s"Hi, my name is $name") | |
} | |
class Message(val sender: User, val content: String) | |
abstract class Chat(val members: List[User], val messages: List[Message]) { | |
def printMessages(): Unit = messages.foreach(m => | |
println(s"Sender: ${m.sender.name}, message: ${m.content}") |
I hereby claim:
To claim this, I am signing this object: