[Swift-devel] Call function.
Mihael Hategan
hategan at mcs.anl.gov
Sun Aug 14 17:05:55 CDT 2011
On Mon, 2011-08-15 at 03:27 +0530, Yadu Nand wrote:
> >> What I'm hoping to achieve is to make this simpler like :
> >> int results[int] = map ( square , [1,2,3,4,5] );
> >>
> >> How does this look ? Will this be useful ?
>
> > I'm not sure I would say useful as much as convenient. But it goes back
> > to an issue mentioned earlier: what is the type signature of "map"?
>
> Given a function func of type :
> (type1) func (type2)
>
> The type signature for map will be like :
> ( type1[ type3] ) map ( <func> , type2[type3] );
>
What if I have two functions:
(type1) f(type2)
(type4) f(type5)
?
More information about the Swift-devel
mailing list