Created
November 28, 2018 08:42
-
-
Save robhinds/6ca96782e10c149d68dd5f633a28a702 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
implicit def hnilGenerator = new Generator[HNil] { | |
override def generate = HNil | |
} | |
implicit def hlistGenerator[H, T <: HList](implicit headGen: Generator[H], tailGen: Generator[T]) = | |
new Generator[H :: T] { | |
override def generate = headGen.gen :: tailGen.gen | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment