Skip to content

mazhara/variance_hw

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

variance_hw

Just for understanding variance in scala

Tasks:

  • implement all needed case class and case object for proposed traits
    trait ContrVOrdering[-T] {
      def compare(a: T, b: T): Int
    }
    and
    trait BiTree[+T] {
      val value: T
      val left: BiTree[T]
      val right: BiTree[T]
      def add[U/*Think about bound here*/](value: U)(implicit ord: ContrVOrdering[U]): BiTree[U]
    }
  • write tests using scalatest
  • write tests using scalacheck

NOTE: Feel free to extend / change any interface if needed.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Scala 100.0%