Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8067547
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T12:19:49+00:00 2026-06-05T12:19:49+00:00

F# allows .NET and OCaml formatting of signatures. This can be confusing when you

  • 0

F# allows “.NET” and “OCaml” formatting of signatures. This can be confusing when you fall into the habit of using one style, and then find a situation where you cannot properly format the signature you need. Consider this code, which requires a flexible type as the output of the function input to foo:

let foo n (bar: int -> #seq<'a>) =
    (fun () -> Vector.ofSeq (bar n))

let foobar n = Array.ofSeq([1..n])

let x = foo 10 foobar

I could not figure out how to express #seq<‘a> in OCaml format. Is it possible?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T12:19:51+00:00Added an answer on June 5, 2026 at 12:19 pm

    The following compiles just fine:

    type A<'a>(x) =
        member __.Get : 'a = x
        abstract PairWith : 'b -> ('a * 'b * int)
        default __.PairWith y = x, y, 1
    
    type B<'a>(x) =
        inherit A<'a>(x)
        override __.PairWith y = x, y, 2
    
    let pairAB (x : #A<'a>) y =
        x, x.PairWith y
    
    type 'a X (x) =
        member __.Get : 'a = x
        abstract PairWith : 'b -> ('a * 'b * int)
        default __.PairWith y = x, y, 1
    
    type 'a Y (x) =
        inherit X<'a>(x)
        override __.PairWith y = x, y, 2
    
    let pairXY (x : #('a X)) y =
        x, x.PairWith y
    

    So you can guess (and then confirm with F# Interactive) that you are looking for #('a seq).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Okay, so ASP.net allows one to embed Images into an Assembly and access them
My ASP.NET (3.5) app allows users to run some complex queries that can take
The .Net framework has an Array.Sort overload that allows one to specify the starting
.NET allows to extend XSLT by using the so called extension object. Very handy
Is there something in .Net that allows storing/retrieving/contains keys without values? I can use
Can anyone tell me the PHP equivalent of web.config settings (in .NET) that allows
I just noticed .net allows us to do like this. public void Func1(ref String
My asp.net site allows users to pick the theme they want from a list
The ExpandoObject class being added to .NET 4 allows you to arbitrarily set properties
I have an ASP.NET application and a Windows Service. My ASP.NET application allows for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.