1 module Language.DTC.Utils where
3 import Control.Applicative (Applicative(..))
5 import Data.Function (($), (.))
6 import Data.Functor (Functor(..), (<$>))
7 import Text.Show (Show)
11 = PaddedList { padded :: [a]
15 instance Functor PaddedList where
17 instance Applicative PaddedList where
19 PaddedList xs x <*> PaddedList ys y =
20 zapp xs ys `PaddedList` x y
23 zapp as [] = ($ y) <$> as
24 zapp (a : as) (b : bs) = a b : zapp as bs