How to add multiple items to HList
?
My naive version doesn't compile:
(1 to 100).foldLeft(HNil)((l,i) => i :: l)
For ordinary List
s this approach would work well. For HList
, however, I assume, it's required to provide a Poly2
that takes a single item and a HList and returns the appended list.
Of course, if there are any better ways to add multiple item, those approaches would be very appreciated.