russo
public text v1 · immutabledata Val = A | B | C | D
instance Show Val where
show A = "Alpha"
show B = "Beta"
show C = "Charlie"
show D = "Delta"
instance Show Lis where
show (K x y) = "(K " ++ show x ++ " " ++ show y ++")"
show (Konez) = "Konez"
data Lis = K Val Lis | Konez
fst :: Lis -> Val
fst (K x y) = x
zip :: Lis -> Lis -> Lis
zip (Konez) (K a b) = (K a b)
zip (K x y) (Konez) = (K x y)
zip (K x y) v = (K x (zip y v)) -- Here i want it to zip y v until y==Konez