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

  • SEARCH
  • Home
  • 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 7913971
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T13:58:15+00:00 2026-06-03T13:58:15+00:00

This post from F# News states that F# can inline a function passed as

  • 0

This post from F# News states that F# can inline a function passed as an argument.
Is it always the case? Does it happen automatically?

  • 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-03T13:58:16+00:00Added an answer on June 3, 2026 at 1:58 pm

    The answer is no. If you have a function like the following, lambdas do not get inlined.
    In the following code lambdas are invoked using FSharpFunc<,>.InvokeFast()

    let fold f s l = 
        let rec loop acc l =
            match l with []->acc |h::t->loop (f acc h) t
        loop s l
    
    let list = [1;2;3;4]
    
    list|>fold (fun acc x->x+acc) 0|>printfn "%d"
    list|>fold (fun acc x->x*acc) 1|>printfn "%d"
    

    But if you mark fold function as inline situation changes. Not only fold function gets inlined, but lambdas get inlined as well. I used .NET Reflector to confirm that.

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

Sidebar

Related Questions

All are from this post . What does these statement mean: error(nargchk(5, 6, nargin));
Should be an easy one. I thought, from reading this blog post that I
I'm writing a CMS that user can post some news and comments. I have
I've seen a plugin for Vim called AutoClose (discovered from this post) which automatically
I've installed NVM for node.js using the instructions from this post: http://www.backdrifter.com/2011/02/18/using-nvm-and-npm-to-manage-node-js/ When I
For some time I am worknig in MVC, I learnt from this post, http://evolpin.wordpress.com/2011/04/12/asp-net-mvc-partialview-with-ajax/#comment-435
I have to extract columns from a text file explained in this post: Extracting
While browsing I came across this blog post about using the Wikipedia API from
I have this LINQ... var n = from a in this.DataContext.News select new {
I'm currently trying to expand my basic news feature so that comments can be

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.