scala - Why is there no Functor instance for Array in Scalaz -


it looks scalaz provides functor instance list not provide array (or seq).

scala> val fa = functor[array] <console>:17: error: not find implicit value parameter f: scalaz.functor[array]        val fa = functor[array]                        ^ scala> val fl = functor[list] fl: scalaz.functor[list] = scalaz.std.listinstances$$anon$1@20c4b59  scala> val fl = functor[seq] <console>:17: error: not find implicit value parameter f: scalaz.functor[seq]        val fl = functor[seq]                        ^ 

why ? aren't functors ?

scalaz requires objects follow laws functors. prescribes "everything immutable" philosophy of code construction. said, array mutable, wouldn't create functor instance it. seq on other hand abstract interface , unknown "correct" data type be. is, seq how know underlying object return , therefore not violate laws?


Comments