mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
10 lines
222 B
Swift
10 lines
222 B
Swift
import _Differentiation
|
|
|
|
@inlinable
|
|
@differentiable(where T: Differentiable)
|
|
public func identity<T>(_ x: T) -> T { x }
|
|
|
|
public func foo<T: Differentiable>(_ f: @differentiable (T) -> T = identity) -> T {
|
|
fatalError()
|
|
}
|