j
k
j a
j l
Romildo,
I could write the (Functor ExprF) instance: instance Functor ExprF where fmap f expr = case expr of Num n -> Num n Var v -> Var v Bin op x y -> Bin op (f x) (f y)
I could write the (Functor ExprF) instance:
instance Functor ExprF where fmap f expr = case expr of Num n -> Num n Var v -> Var v Bin op x y -> Bin op (f x) (f y)
Yes, excellent. That'll do. Cheers, Stefan
Back to the thread
Back to the list