Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
object CompanySalaryApplication:
case class Employee(name: String, salary: Int)
case class CompanyBonus(amount: Int)
trait SalaryComputation:
def computeSalary(employee: Employee)(using companyBonus: CompanyBonus): Int =
employee.salary + companyBonus.amount
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment