Guest User

Untitled

a guest
Jun 14th, 2011
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
F# 0.79 KB | None | 0 0
  1. #light
  2.  
  3. open System
  4. open System.Collections.Generic
  5. open TestLib
  6.  
  7. let MyMap = Map [1, seq [1;2;4]; 2, seq [5;6;7] ]
  8. let MySeq = MySharp.test_fun(MyMap)
  9. let len = Seq.length MySeq
  10.  
  11. let filteredVariants_f (intersection : IDictionary<int, int seq>)
  12.                        (reserv : #seq<_> * #seq<_>)
  13.                        (acc : IDictionary<int, int>) =
  14.     let variants = MySharp.test_fun intersection
  15.     match Seq.length variants with
  16.         | 0 -> Seq.empty
  17.         | _ ->
  18.             let filteredVariants =
  19.                 Seq.collect
  20.                     (fun (vrnt : int array) ->  vrnt)
  21.                     variants
  22.             filteredVariants
  23.  
  24. let t = filteredVariants_f MyMap ([],[]) (Map [1,1; 2,2])
  25.  
  26. [<EntryPoint>]
  27. let main _ =
  28.   printfn "%A" t
  29.   Console.ReadLine()
  30.   0
Advertisement
Add Comment
Please, Sign In to add comment