hlist

Algorithm to define pairs from a list

Algorithm to define pairs from a list
Christmas is coming: it is time to determine who is going to make a gift to whom. I'm looking for such an algorithm.Taking a list(1 to 10)for instance, create random pairs ensuring that:everybody item is associated to another item;none of the items i

Avoid losing type info in return value

Avoid losing type info in return value
I'm trying to find a way to avoid losing type information in the return value for my method.I have the following:val defs0 = Default.mkDefault[Person, Some[String] :: Some[Int] :: HNil](Some("odd") :: Some(42) :: HNil)Using IntelliJs "Add t

How to map HList to List[Type], List[TypeTag], or List[String]

How to map HList to List[Type], List[TypeTag], or List[String]
I am playing around with the Scala REPL and its bind method. Unfortunately it takes a ClassTag which erases types some type information, e.g.List[Int]becomesList[_]. So I want to pass an HList to my REPL wrapper and get the type as a string which I c

Applying validation from HList to a case class

Applying validation from HList to a case class
In attempting to do validation with application functors (Monad to catch multiple exceptions (not just fail on single)), I came across a hard limit in scalaz that disallows more than 14 functors, so a helpful comment from here (https://github.com/sca
What Others Are Reading