Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- object MyHList {
- trait HL[A] {
- type Head <: A
- type Tail <: HL[_]
- }
- /*class HNil extends HL[Nothing] {
- type Tail = Nothing
- }*/
- type HNil = HL[Nothing] { type Tail = Nothing }
- type ::[A,B <: HL[_]] = HL[A] {
- type Head=A
- type Tail = B
- }
- //type hl2func[A <: HL[_],O] = hl2func[A#Tail,A#Head] => O
- trait HL2Func[HList <: HL[_], O] {
- type hl2func = HL2Func[HList#Tail,HList#Head]#hl2func => O
- }
- type x = Int :: String :: HNil
- //type x = ::[Int, ::[String, HNil]]
- }
Add Comment
Please, Sign In to add comment