Types can be parameterized in the following way:
@spec reduce(list, b, (a, b -> b)) :: b when a: any, b: any