-2
也许它已经在F#中实现了?如何使用F#中的中缀运算符定义一类布尔函数?
基本上我想定义一个类与缀运营商通用的过滤功能,所以一些东西,看起来像
type Filter<'T> = ('T -> bool) with
static member (|*) (f:Filter<'T>) (g:Filter<'T>) = (fun x -> (f x) ||
(g x)) // OR operator
但这不是它似乎
停止由于正确的语法到错误System.Exception:操作不能由 完成由于较早的错误类型缩写不能有 增补在2,5类型缩写不能有成员在3,19
感谢
错误味精就好了 – robkuz
@robkuz我包括错误味精你 –