I’m curious why this
let f = (fun a b -> a, b) >> obj.Equals
gives the error
No accessible member or object constructor named ‘Equals’ takes 1 arguments
but this works
let f = (fun a -> a, a) >> obj.Equals
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Consider the types.
(>>)has type('a -> 'b) ->('b -> 'c) -> ('a -> 'c), but you’re trying to call it with arguments of type'a -> ('b -> 'a*'b)andobj * obj -> bool, which can’t be made to fit together like that.You could of course define a new combinator for composing binary and unary functions:
in which case you can use it in your example instead of
(>>).