From: Alan P. <ap...@re...> - 2003-05-25 07:37:28
|
In article <slr...@re...>, Alan Post wrote: > > The perl map function allows the number of outgoing items to be > other than 1, for instance: > > my @l2 = map { if ( filter( $_ ) { $_ } else {()}} @l1; > > or: > > my %h = map { $_, f( $_ )} @l; I just realized that perl map is simply: let merge_map f e = Enum.concat (Enum.map List.enum (Enum.map f e)) |