Advertisement
Guest User

Untitled

a guest
Jul 6th, 2015
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. @import Foundation;
  2.  
  3.  
  4. NS_ASSUME_NONNULL_BEGIN
  5.  
  6. @interface Function<__contravariant InType, __covariant OutType> : NSObject
  7. {
  8. // interestingly, this does work here (though OutType & InType are not available in the @implementation)
  9. OutType (^_block)(InType);
  10. }
  11.  
  12. - (instancetype)initWithBlock:(OutType (^)(InType))block;
  13.  
  14. - (OutType)evaluateAt:(InType)value;
  15.  
  16. @end
  17.  
  18. NS_ASSUME_NONNULL_END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement