- 16 名前:デフォルトの名無しさん mailto:sage [2007/03/25(日) 06:38:24 ]
- F#とLINQの相性ワロス。(´・ω・)
extension methodとcurryingの引数の順序が逆なので、いちいち変換しなければならん。 #I @"C:\WINDOWS\Microsoft.NET\Framework\v3.5.20209";; #r "System.Core.dll";; #r "System.Xml.Linq.dll";; #light open System open System.Linq open System.Xml.Linq open IEnumerable let to_XName s = XName.op_Implicit(s) let to_DateTime e = XElement.op_Explicit(e) : DateTime let to_Func f = new Func<_, _>(f) let order_by_desc f s = Enumerable.OrderByDescending(s, to_Func f) let select f s = Enumerable.Select(s, to_Func f) let take n s = Enumerable.Take(s, n)
|

|