Return primes between m and n using multiple threads let primes m n seq m n Seq

Return primes between m and n using multiple threads

This preview shows page 16 - 19 out of 23 pages.

/// Return primes between m and n using multiple threadsletprimes m n =seq {m .. n}|> Seq.map primeAsync|> Async.Parallel|> Async.RunSynchronously|> Array.filter snd|> Array.map fst// Run a testprimes 1000000 1002000|> Array.iter (printfn "%d")See also[edit]Free and open-source software portalOCamlC Sharp (programming language)(C#).NET Framework
Background image
Scala (programming language)ClojureHaskell (programming language)NemerleNotes[edit]1.^ Jump up to:abc-f-4-5/2.^-5-preview/3.^.Missing or empty |title=(help)4.^.Missing or empty |title=(help)5.^ Jump up to:abSyme, Granicz & Cisternino (2007:2)6.^ Jump up to:abcde"F# Historical Acknowledgements". Retrieved 2012-11-24.7.^ Jump up to:abSyme, Don(2006). "Leveraging .NET Meta-programming Components from F#". [F#] is rooted in the Core ML design, and in particular has a core language largely compatible with that of OCaml8.^for async9.^ Jump up to:abcdefThe F# Software Foundation. "Using F# with HTML5 Web Applications". Retrieved 2014-06-07.10.^ Jump up to:abcdefgThe F# Software Foundation. "Using F# for GPUProgramming". Retrieved 2014-06-07.11.^ Jump up to:abcThe F# Software Foundation. "The F# Software Foundation". Retrieved 2012-11-24.12.^ Jump up to:abThe F# Software Foundation. "F# Compiler (open source edition) @ github". Retrieved 2012-11-24.13.^S. Somasegar. "F# - A functional Programming Language". Retrieved 2007-10-18.14.^Friedman, Nat (May 28, 2014). "Announcing Xamarin 3". Retrieved August 26,2014.
Background image
15.^Pickering, Robert (2009). Beginning F#, Apress. p. 11.16.^Syme, Don. "F# 1.0.8 released". Microsoft. Retrieved September 7, 2014.17.^Syme, Don. "F# 2.0 released as part of Visual Studio 2010". Microsoft. Retrieved September 7, 2014.18.^Zander, Jason. "Visual Studio 2012 and .NET Framework 4.5 released to the web". Microsoft. Retrieved September 7, 2014.19.^"Visual Studio 2013 released to web". Microsoft. Retrieved September 7, 2014.20.^"Announcing the RTM of Visual F# 4.0". Microsoft. Retrieved September 15,2015.21.^"Announcing F# 4.1 and the Visual F# Tools for Visual Studio 2017".Retrieved 2017-03-08.22.^23.^g_f_45/24.^Edwards, Kathryn (23 December 2008). "The A-Z of programming languages: F#". networkworld.com. IDG. Retrieved 8 August 2016.25.^McNamara, Brian. "More About F# 3.0 Language Features". Microsoft. Retrieved September 7, 2014.26.^McNamara, Brian. "Announcing a pre-release of F# 3.1". Microsoft. Retrieved September 7, 2014.27.^"Announcing the RTM of Visual F# 4.0". Retrieved 2017-03-08.28.^"Announcing F# 4.1 and the Visual F# Tools for Visual Studio 2017".Retrieved 2017-03-08.29.^ Jump up to:abcdefgh"F# Language Overview"(PDF). Retrieved 2007-12-14.30.^ Jump up to:ab"Some Details on F# Computation Expressions". Retrieved 2007-12-14.
Background image
Image of page 19

You've reached the end of your free preview.

Want to read all 23 pages?

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture