#1286 Map's fandoc inaccuracy

tonsky Tue 2 Nov 2010

In a fandoc to Map#setAll method you state that

This method is semanatically equivalent to:

m.each |K k, V v| { this.set(k, v) }

but the each method has a different order of closure args:

Void each(|V val, K key| c)

(which is actually kinda unnatural btw, why not |K key, V val|?)

brian Tue 2 Nov 2010

Thanks for reporting - I pushed a fix. Ordering matches List.each so that you can iterate values/keys using collection->each, since List is essentially just an ordered map indexed by Int.

Login or Signup to reply.