What does the # symbol mean in the signature of the f # function?

I saw a function defined as follows:

let private applyTarget (logger:#ILogger) ceiling target = logger.Debug "enforce ceiling" match target > ceiling with | true -> ceiling | false -> target 

What does the # symbol in the signature mean?

What is the difference between logger:ILogger and logger:#ILogger ?

+5
source share
1 answer

A signature of type #t is called a "flexible type" and is a short hand for 'a when 'a :> t .

That is, #t means "any subtype of t ".

+8
source

All Articles