typelevel-1.0.4: src/Type/Zip.hs
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE UndecidableInstances #-}
module Type.Zip where
type family Zip lst lst' where Zip lst lst' = ZipWith '(,) lst lst' -- Implemented as TF because #11375
type family ZipWith f lst lst' where
ZipWith f '[] lst = '[]
ZipWith f lst '[] = '[]
ZipWith f (l ': ls) (n ': ns) = f l n ': ZipWith f ls ns