// Unfortunately, the generated Swift interface is not very useful:
import Foundation
class Function : NSObject {
init(block: (AnyObject) -> AnyObject)
func evaluateAt(value: AnyObject) -> AnyObject
}
@import Foundation;
NS_ASSUME_NONNULL_BEGIN
@interface Function<__contravariant InType, __covariant OutType> : NSObject
{
// interestingly, this does work here (though OutType & InType are not available in the @implementation)
OutType (^_block)(InType);
}
- (instancetype)initWithBlock:(OutType (^)(InType))block;
- (OutType)evaluateAt:(InType)value;
@end
NS_ASSUME_NONNULL_END