[Swift-devel] Call function.
Yadu Nand
yadudoc1729 at gmail.com
Sun Aug 14 16:57:58 CDT 2011
>> 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] );
--
Thanks and Regards,
Yadu Nand B
More information about the Swift-devel
mailing list