[swift-dev] Advice for implementing "literal values as generic types"

Slava Pestov spestov at apple.com
Tue Aug 29 15:49:52 CDT 2017


> On Aug 29, 2017, at 11:03 AM, David Sweeris via swift-dev <swift-dev at swift.org> wrote:
> 
> Hi everyone! I'm trying to implement literal values as generic types.

Can you briefly explain what you mean by this?

Are you referring to let-polymorphism, like

let fn = { $0 }
let f1: (Int) -> Int = fn
let f2: (Float) -> Float = fn

Slava



More information about the swift-dev mailing list