Favorite Tags
View questions based on your favorite tags across the Stack Exchange network

3 answers

Parameter names in abstract tupled function

Related to No argument names in abstract declaration?, how would you do this with a C#-style tupled argument? So if I wanted abstract member createEmployee : (string * string) -> Employee how ...

3 answers | 4 hours ago by Dax Fohl on Stack Overflow stackoverflow.com
1 answer

F#: Is Profile 47 required for Microsoft.FSharp.Data.TypeProviders?

This is a follow-up to my post yesterday. To recap, I received this error message when trying to build my project: FSC: Error FS2024: Static linking may not use assembly that targets different ...

2 answers

FSharp pattern that matches List type

I want to match the object obj1 of type "obj" according to its actual type. The problem is that the type check pattern for list type (the second one in the example below) does not match F# lists. let ...

1 answer

Does F# have a way to print the type of an expression?

I'm looking for the moral equivalent of ghci's: Prelude> :t 1 + 2 1 + 2 :: Num a => a

1 answers | 15 hours ago by Steven Shaw on Stack Overflow stackoverflow.com
0 answers

FSharp Http doesn't set cookie

I'm using FSharp.Data HTTP 2.1 to login a website. Http.RequestString https://..../portal/login.do Http.RequestString https://..../portal. And it will set the following cookie Set-Cookie: ...

4 answers

Is there a simple way to print each element of an array?

let x=[|15..20|] let y=Array.map f x printf "%O" y Well, I got a type information. Is there any way to print each element of "y" with delimiter of ",", while not having to use a for loop?

4 answers | 19 hours ago by vik santata on Stack Overflow stackoverflow.com
2 answers

FSharp: Type inference with generic

I do not understand why the following code does not compile module GenericsTest = open System type Dog = { name:string } type Apple = { size:int } let ...

2 answers | 19 hours ago by Mike S on Stack Overflow stackoverflow.com
0 answers

F#: FSC: Error FS2024: Static linking may not use assembly that targets different profile

F# is my first programming language. I use MS Visual Studio 2013, .NET Framework 4.5. For my personal coding project, these are the references I have included: FSharp.Data.TypeProviders ...

2 answers

Generics in record “with” syntax

If I've got a record with a generic field, is there any way to mimic the convenient with syntax when changing the generic? i.e. if I have type User<'photo> = // 'photo can be Bitmap or Url { ...

2 answers | yesterday by Dax Fohl on Stack Overflow stackoverflow.com
1 answer

ReSharper's <reference path=“”/> is not working with local paths

I'm trying to reference some libs in qunit tests. When I'm using Resharper's /// <reference path="/Scripts/require.js" /> It produces the following reference in the html: <script ...

1 answer

How to take the number field from a sequence of BigInteger in F#?

Take this factorial sequence as an example: factTake 5;; val it : seq<System.Numerics.BigInteger> = seq [1 {IsEven = false; IsOne = true; IsPowerOfTwo = true; ...

1 answers | yesterday by Nick on Stack Overflow stackoverflow.com
1 answer

Converting C# method to quote SQL identifiers to F#

I'm porting the following method (QuoteIdentifier) from C# to F#. It quotes SQL identifiers (also handling embedded and incorrect quotes). For example: QuoteIdentifier("dbo.mytable", "[", "]") ...

1 answers | yesterday by Daniel on Stack Overflow stackoverflow.com
3 answers

Getting the most out of Resharper - good tutorials/screencasts

I've just installed Resharper, and I really don't know how to use it "correctly". I noticed that there are some demos and documents at their website, but I'm wondering.. ..how did you learn to use it ...

3 answers | yesterday by l3dx on Stack Overflow stackoverflow.com
1 answer

FAKE FtpHelper Usage

I am trying to use F# FAKE to deploy a zip file to GoDaddy using FTP. There seems to be a FTPHelper in FAKE but I can't find any usage examples of how to create a target to use it. ...

1 answers | yesterday by devfunkd on Stack Overflow stackoverflow.com
2 answers

F# project compiling error for a function returning a tuple

I created an F# project by visual studio, added function like this: let fangle a b c = a+1, b+1, c+1 [<EntryPoint>] let main argv = printfn "%i,%i,%i" (fangle 3 4 5) // compile error ...

2 answers | yesterday by Immanuel Kant on Stack Overflow stackoverflow.com
1 answer

F# command line (fsi) doesn't recognize function, compile error, why?

I tried F# under command line, it doesn't recognize function definition > let ref f n= - if(n<=2)then 1 - else f(n-1)+f(n-2) - ;; val ref : f:(int -> int) -> n:int -> int > ...

1 answers | yesterday by Immanuel Kant on Stack Overflow stackoverflow.com
3 answers

Why does ReSharper tell me “implicitly captured closure”?

I have the following code: public double CalculateDailyProjectPullForceMax(DateTime date, string start = null, string end = null) { Log("Calculating Daily Pull Force Max..."); var ...

3 answers | yesterday by MyCodeSucks on Stack Overflow stackoverflow.com
1 answer

Can I intercept the F# sequence generator?

trying to work around a problem in outside library - is there a way to try-catch the generator itself item by item (probably not, but just to be sure...)? let myTest() = let mySeq = seq { for i ...

1 answers | yesterday by Andres on Stack Overflow stackoverflow.com
2 answers

Add all Visual Studio unit tests with a specific TestCategory to a new Resharper testsession

In Visual Studio, in the Test Explorer window, when I group the tests on 'traits', the tests are grouped on a specific category (the public sealed class TestCategoryAttribute class I've put on the ...

1 answer

IntelliSense: aria-valuemax and data-ng-style aaaargh?

While typing code in a Razor (.cshtml) file using Visual Studio 2013 (Update 4) with ReSharper 8.2.3 (updated by suggestion from this question), my IntelliSense is doing stuff that is driving me ...

3 answers

Can all recursive structures be replaced by a non recursive solution?

For example, could you define a list in Haskell without defining a recursive structure? Or replace all lists by some function(s)? data List a = Empty | (a, List a) -- <- recursive definition ...

1 answer

Calling partially applied functions from C#

I have a general function that takes a lot of parameters f : a -> b -> c -> d -> e -> f I want to provide specialized functions that only take the last two parameters, but provide ...

1 answers | yesterday by Luka Horvat on Stack Overflow stackoverflow.com
4 answers

F# records vs .net struct

is f# records is the same as .net struct? I saw people talk about f# struct,are they use this term interchangable with F# records? Like in FSharp runs my algorithm slower than Python!, talking about ...

4 answers | 2 days ago by user8321 on Stack Overflow stackoverflow.com
3 answers

F# compiler directive for 'symbol not defined'

Is there a way to specify that a symbol should not be defined, in an F# #if directive? Something like this: #if not COMPILED // do script stuff here #endif Though the above is a syntax error. The ...

3 answers | 2 days ago by Batibix on Stack Overflow stackoverflow.com
1 answer

Visual Studio editor losing focus when unit testing

This may be a trivial question but I had no luck finding an answer so I ended up asking by myself.(I apologize if there already is a same question...) I'm using VS2012 + Resharper + TestAfterBuild ...

3 answers

Why can't I print this array in F#?

I have this list in C#: List<string> words = new List<string> { "how", "are", "you" }; I can easily print the content of the list with: foreach(string word in words) ...

3 answers | 2 days ago by brinch on Stack Overflow stackoverflow.com
3 answers

How can I make this Join in F#?

I have a lambda join in C# which looks like this: int[] arrX = { 1, 2, 3 }; int[] arrY = { 3, 4, 5 }; var res = arrX.Join(arrY, x => x, y => y, (x, y) => x); After execution res contains ...

3 answers | 2 days ago by brinch on Stack Overflow stackoverflow.com
3 answers

F# dynamic object access

Is there a way to access DLR object (eg. DynamicObject subclass instance) members (properties and methods) in F# that is similar to C# dynamic ?

2 answers

Can I use dynamic types in F#?

.net4.0 mytest.py def Add (a, b): return a+b I can use it in C# 4, like this: ScriptRuntime runtime = Python.CreateRuntime(); dynamic script = runtime.UseFile("mytest.py"); ...

2 answers

Looking for robust, general op_Dynamic implementation

I've not been able to find a robust, general op_Dynamic implementation: can anyone point me to one? So far searches have only turned up toys or specific purpose implementations, but I'd like to have ...

2 answers | 2 days ago by Stephen Swensen on Stack Overflow stackoverflow.com
15 30 50 per page
1 2 3