I'm also a bit confused by the exact terminology used around list algebras. In the course notes we have:
data ListF a x = NilF | ConsF a x
type List a = Fix (ListF a)
type Algebra f a = f a -> a
type ListAlg a b = Algebra (ListF a) b
So, if I'm reading that right, a `ListAlg` with type params `a` and `b` is a function from the functor `ListF a`, applied to `b`, to `b`, or in other words `(ListF a b) -> b`.
Notably, it's *not* a function from `List a` (aka `Fix (ListF a)`) to `b`. My understanding is that if we want a function from `List a` to `b`, we have to take the catamorphism of the list algebra.
However, this problem statement seems to define the list algebra as a function from List(X) to X, which looks like it should translate to `List x -> x`. But this is what you'd get if you took the catamorphism of a `ListAlg x x` list algebra. It's not the list algebra itself.
Is the problem statement just being a bit loose with the terminology, such that when it says the list algebra is List(X) -> X, it really means that that's the catamorphism of the list algebra? Or am I missing something?