Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Represent ItemRefs as an ADT #30

Closed
lippo97 opened this issue Jan 15, 2021 · 0 comments
Closed

Represent ItemRefs as an ADT #30

lippo97 opened this issue Jan 15, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request low priority A task that is not urgent.

Comments

@lippo97
Copy link
Contributor

lippo97 commented Jan 15, 2021

Like this:

  sealed trait Item
  sealed trait ItemRef
  final case class SimpleItem(name: String)                         extends ItemRef
  final case class DecoratedItem(decoration: String, item: ItemRef) extends ItemRef
  val itemRetriever: Map[ItemRef, Item] = ???

  val a = SimpleItem("key")
  val b = DecoratedItem("red", SimpleItem("key"))
  val c = DecoratedItem("big", SimpleItem("key"))
  DecoratedItem("big", DecoratedItem("big", SimpleItem("key")))
@lippo97 lippo97 added enhancement New feature or request low priority A task that is not urgent. labels Jan 15, 2021
@maldins46 maldins46 added this to Backlog in ScalaQuest Project via automation Jan 22, 2021
@maldins46 maldins46 moved this from Backlog to In progress (current Sprint) in ScalaQuest Project Jan 22, 2021
ScalaQuest Project automation moved this from In progress (current Sprint) to Done tasks (current sprint) Jan 28, 2021
@maldins46 maldins46 moved this from Done tasks (current sprint) to Done tasks (post Sprint) in ScalaQuest Project Jan 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request low priority A task that is not urgent.
Projects
ScalaQuest Project
Done tasks (post Sprint)
Development

No branches or pull requests

3 participants