Re: [Vala] valasemanticanalyzer error
- From: Martin DeMello <martindemello gmail com>
- To: Andrea Del Signore <sejerpz tin it>
- Cc: vala-list gnome org
- Subject: Re: [Vala] valasemanticanalyzer error
- Date: Fri, 20 Aug 2010 17:54:08 +0530
On Fri, Aug 20, 2010 at 5:47 PM, Andrea Del Signore <sejerpz tin it> wrote:
the only error I can spot is here:
public void map(DFunc fn, Gee.List acc) {
should be:
public void map(DFunc fn, Gee.List<G> acc)
No, it is a list of the target type, not the source type.
I really don't understand what are you trying to do can you explain to
me? Thanks.
I'm trying to write a generic map function that consumes a list and
emits a transformed list. If I have two lists
a = List<source_type> // full
b = List<target_type> // empty
and a function
target_type fn(source_type)
I should be able to write
a.map(fn, b)
And b[i] should be fn(a[i]) for all i in a's indices.
martin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]