I am trying to split a map based on a list of predicates.
I wrote the following function for this:
def multipartition[A,B](map : Map[A,B], list : List[(A,B) => Boolean]) : List[Map[A,B]] = list match { case Nil => Nil case l :: ls => val (a, b) = map partition l;
The scala compiler (I execute 2.9.1) fails at the specified location with "type mismatch", found (A, B) => Boolean, required: (A, B) => Boolean ".
Has anyone ever seen something like this? Any idea how to fix this?
Thanks,
LP
source share