Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static List<object> GetParams(Microsoft.FSharp.Collections.List<object> inparams)
- {
- List<object> parameters = new List<object>();
- while (inparams != null)
- {
- parameters.Add(inparams.Head);
- inparams = inparams.Tail;
- }
- return inparams;
- }
- new List<LiteralType>(parameters);
- using System;
- using System.Collections.Generic;
- using Microsoft.FSharp.Collections;
- public static class FSharpInteropExtensions {
- public static FSharpList<TItemType> ToFSharplist<TItemType>(this IEnumerable<TItemType> myList)
- {
- return Microsoft.FSharp.Collections.ListModule.of_seq<TItemType>(myList);
- }
- public static IEnumerable<TItemType> ToEnumerable<TItemType>(this FSharpList<TItemType> fList)
- {
- return Microsoft.FSharp.Collections.SeqModule.of_list<TItemType>(fList);
- }
- }
- var lst = new List<int> { 1, 2, 3 }.ToFSharplist();
- let public GetListElementAt i = mylist.[i]
Add Comment
Please, Sign In to add comment