AP
Size: a a a
AP
к
к
NK
NK
к
к
data a :> b
NK
к
NK
:>
?к
к
class (c1 x, c2 x) => ComposeConstraint c1 c2 x where
instance (c1 x, c2 x) => ComposeConstraint c1 c2 x where
type family FoldR (f :: a -> b -> b) (s :: b) (xs :: [a]) where
FoldR _ s '[] = s
FoldR f s (x ': xs) = f x (FoldR f s xs)
class Const' a b where
instance Const' a b where
type IdentityConstraint = Const' ()
type ComposeConstraints (l :: [* -> Constraint]) =
FoldR ComposeConstraint IdentityConstraint l
z :: ([Int], [Float])
z = mapBoth
@(ComposeConstraints '[Num, Ord])
((:[]) . product . nub)
[3, 2, 3, 2, 1]
[5.3, 2.1]
к
:>
?NK
к
к
NK
NK
AP
(,)
- "инфиксный тип" :)AP