Merging over latest from F# 3.1.X to F# 4.0 (changeset 1350524)
Another merge from F# 3.1.X (changeset 1350654)
Implement Array.contains, List.contains, Seq.contains

    add Seq.contains function

    add List.contains function

    add Array.contains function

    adujst assertion as requested by code review

    remove empty comment lines

    refactor Seq.contains towards better performance as suggested by code review

    refactor List.contains towards better performance as suggested by code review

    refactor Array.contains towards better performance as suggested by code review

    update surface area tests with added contains functions

    define contains functions as inline

    Resetting all of the whitespace changes, so that overall diff stays clean
Implement Array.where, List.where

Commits:
    Implementing "where" for Array and List

    Alphabetical order in .fsi files

    Show possible System.ArgumentNullException in docs for Array.where

    Make XML docs more specific for Array.where and List.where

    Make it more obvious that Array.where = Array.filter

    Adding surface area fir Array.where and List.where

    Array.filter already does a null check. No need to do this in Array.where
Implement Array.exactlyOne, List.exactlyOne

Commits:
    Implementing "exactlyOne" for Array and List

    Alphabetical order in .fsi files

    Simplify unit tests for exactlyOne

    Check for null in Array.exactlyOne

    Make XML comment more specific in List.exactlyOne

    Adding surface area for Array.ExactlyOne and List.ExactlyOne

    Do not use pattern matching on array in Array.exactlyOne
Implement Array.compareWith, List.compareWith

Commits:
    Implementing "compareWith" for Array and List

    Show ArgumentNullException for compareWith on arrays

    use tail recursive version for Array.compareWith

    use tail recursive version for List.compareWith

    Adding surface area for Array.CompareWith and List.CompareWith

    Only use one test method for compareWith

    Adding more tests for compareWith

    Putting all length checks to the beginning in Array.compareWith

    Use min operator in Array.compareWith
Implement Array.singleton, List.singleton

Commits:
    implementing "singleton" for array and list

    Add surface area for singleton

    Add null test case for singleton

    Change 'yields' to 'contains' in docs, per code review
Implement Array.pairwise, List.pairwise

Commits:
    implementing "pairwise" for array and list

    Show possible System.ArgumentNullException in docs for Array.pairwise

    use Array.init version for Array.pairwise

    use Array.init version for List.pairwise

    Adding surface area for pairwise
Implement Array.last, List.last

Commits:
    implementing "last" for array and list

    Show possible System.ArgumentNullException in docs for Array.last

    Use direct array lookup for Array.last

    use only one test method for "last"

    Align "last" docs with the rest

    Using tail rec version for List.last

    Adding surface area for "last"
Implement Array.distinct, List.distinct

Commits:
    implementing "distinct" for array and list

    fix typo

    Use a HashSet instead of dictionary for "distinct"

    Show possible ArgumentNullException in docs for Array.distinct

    Use only one test method for "distinct"

    Adding surface area for "distinct"

    Use mutable list for "distinct"

    Make Array.distinct use a temp array instead of array comprehension

    Adding some test cases for distinct

    We don't need StructBox any more in Array.distinct

    We don't need StructBox any more in List.distinct

    We don't need StructBox any more in Seq.distinct

    Move the List.distinct back to local.fs

    Add test cases for distinct which show null handling

    Fix typos
Implement Array.distinctBy, List.distinctBy

Commits:
    implementing "distinctBy" for array and list

    Show possible ArgumentNullException in docs for Array.distinctBy

    We don't need StructBox any more in "distinctBy"

    Use single test method for distinctBy

    Add null handling tests for "distinctBy"

    Use temp array instead of array comprehension in Array.distinctBy

    Use mutable lists for distinctBy

    Fix doc parameter name for Array

    Adding surface area tests
Implement Array.take, List.take

Commits:
    implementing "take" for array and list

    Check for ArgumentNullException in Array.take

    Fix typo

    Performance improvement for Array.take

    Performance improvement for List.take

    Use temporay array for List.take

    Do not use array slicing for Array.take

    Do not check length of list in List.take

    Use mutable list instead of temporay array for List.take

    Add List.Take and Array.Take to surface

    Always create a new array in Array.take

    Remove special case for List.take

    Simplify List.take as suggested by @latkin
Implement Array.takeWhile, List.takeWhile

Commits:
    implementing "takeWhile" for array and list

    Check for ArgumentNullException in Array.takeWhile

    Performance optimization for Array.takeWhile

    Do not use array slicing in Array.takeWhile

    Use a temporary array for List.takeWhile

    Use mutable list version instead of temp array for List.takeWhile

    Adding surface area for takeWhile

    Adding more test cases for takeWhile

    Fix bug in List.takeWhile where predicate of first element is false

    Apply dsyme's suggestion on takeWhile
Implement Array.splitAt, List.splitAt

Commits:
    implementing "splitAt" for array and list

    Check for ArgumentNullException in Array.splitAt

    Use temporary array to build List.splitAt

    Simplify splitAt test methods according to style guide

    Do now use array splicing in Array.splitAt as described in style guide

    Use mutable list instead of temp array in List.splitAt

    Do not use original array in Array.splitAt - make a clone

    Turn splitAtFreshConsTail inside-out as @latkin suggested

    Fix typos, add surface area tests, apply code review feedback from @dsyme
Implement Array.tryHead, List.tryHead, Seq.tryHead

Commits:
    add tryHead function to the list module

    add tryHead function to the array module

    add tryHead function to the seq module

    add exception possibility to array tryhead docs

    optimize Array.tryHead

    add surface area tests

    Minor cleanup
Implement Array.replicate, Seq.replicate

Commits:
    Create missing test for List.replicate

    Implement Array.replicate

    Implement Seq.replicate

    Make the docs for replicate a bit clearer

    Use only one test method for replicate

    Test for negative arguments for replicate

    Variable i  not used in Seq.replicate

    Use mutable cons cell for List.replicate

    Use System.Linq.Enumerable.Repeat in Seq.replicate if we are on .NET 4.0 or higher

    Adding surface area for replicate

    Small tweaks

    Rolling back change to List.replicate
Implement Array.head

commit 5898cc7e82befdbf9b7457f41e898c3b1b916a57
Merge: 173d833 fec1862
Author: latkin <latkin@microsoft.com>
Date:   Sun Oct 12 10:15:38 2014 -0700

    Merge branch 'hd' of https://git01.codeplex.com/forks/forki/fsharp into PR

    Conflicts:
    	src/fsharp/FSharp.Core.Unittests/SurfaceArea.4.0.fs
    	src/fsharp/FSharp.Core.Unittests/SurfaceArea.Portable.fs

commit fec186272559585de8e47fe070189751906f8553
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Wed Jul 2 18:29:27 2014 +0200

    Adding surface areay for Array.head

commit 334166c0ada7d5457f3c77756d192167b5ebf9f1
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Wed Jul 2 18:25:36 2014 +0200

    Improve docs for Array.head

commit 9dd524476c8afe127d64d2d2d87ae81cae736737
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Wed Jul 2 18:24:40 2014 +0200

    Fixing error message for Array.head

commit b4cf72e2b22b574c28fb7daaf85887546dd06b17
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Mon Jun 30 15:56:22 2014 +0200

    implementing "head" for array
Implement Seq.fold2

commit 3c379b6deba89aeccd0af4d3744f69076f6cc34d
Merge: f197816 6e6f68c
Author: latkin <latkin@microsoft.com>
Date:   Sun Oct 12 10:23:58 2014 -0700

    Merge branch 'fold2' of https://git01.codeplex.com/forks/forki/fsharp into PR

commit 6e6f68ce8b1b0dbf7deb92cf1c6887792118821d
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Fri Jul 4 14:49:20 2014 +0200

    Adding surface are for fold2

commit ac88069f9d2ed8196e5cdbd5294d891d52942b47
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Fri Jul 4 14:45:05 2014 +0200

    Changing Seq.fold2 - sequences need not have equal lengths

commit 74adf606599ba4b648142c532249f782501f0758
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jul 3 23:06:41 2014 +0200

    Check exceptions for Seq.fold2

commit 2be78be51151b83cc9f294254b9de7b20fd71b79
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jul 3 23:02:49 2014 +0200

    Implementing Seq.fold2
Implement Array.countBy, List.countBy

commit 30c0a3284b42ec0fd59bd57d8a63f63613b77301
Author: latkin <latkin@microsoft.com>
Date:   Sun Oct 12 12:35:13 2014 -0700

    Changing List.countBy to dedicated implementation

commit 976c6e995bdad2ac55ec8314aa1d03c66f644423
Merge: 15f04de c521808
Author: latkin <latkin@microsoft.com>
Date:   Sun Oct 12 10:43:21 2014 -0700

    Merge branch 'countBy3' of https://git01.codeplex.com/forks/forki/fsharp into PR

    Conflicts:
    	src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ListModule.fs
    	src/fsharp/FSharp.Core/seq.fsi

commit c5218084e04c4fb9ea5a1ee6c92c8647258cb542
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Sat Jul 5 10:47:27 2014 +0200

    ok variable is not needed in countBy

commit fa934cf2aa536662df38175388d94665c7d87132
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Fri Jul 4 15:36:20 2014 +0200

    Adding surface area for countBy

commit 63e669155017bf186bfdeb7db47a2f59bdce6765
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Wed Jul 2 16:59:46 2014 +0200

    Use direct array implementation for Array.countBy

commit 0a975603f071973a19a10f1cb4c4cedc78d05158
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Wed Jul 2 16:34:50 2014 +0200

    Use only one test method for countBy

commit a25a085cab89b1a9af193e19f8469e25a984f0bf
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Wed Jul 2 16:32:51 2014 +0200

    Fix typo in countBy docs

commit 5d9af6ea78000d5aab885f6361556a72a6d04078
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Wed Jul 2 16:32:40 2014 +0200

    Rename to array in Array.countBy

commit deeaba955ce60ef3981797d16ec423a1f34f863a
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Mon Jun 30 16:15:02 2014 +0200

    Show possible System.ArgumentNullException in docs for Array.countBy

commit 532cdccafd47561517e276acc98b990e5f78b6f1
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Mon Jun 30 12:10:39 2014 +0200

    implementing "countBy" for array and list
Implement Array.map3, Seq.map3

commit cf8e955a90502cc4d64f3b87269729640c03acaf
Author: latkin <latkin@microsoft.com>
Date:   Sun Oct 12 16:00:01 2014 -0700

    Simplify array length check, add portable surface area test

commit b24338d37046b85e6aaac20366fe84e354d3f0c6
Merge: 321dcde 87e2dbf
Author: latkin <latkin@microsoft.com>
Date:   Sun Oct 12 15:15:10 2014 -0700

    Merge branch 'fsharp4' of https://git01.codeplex.com/forks/andrew_khmylov/fsharp into PR

commit 87e2dbf594afcba7b09f6f401eb89197a874a6bb
Author: Andrew Khmylov <andrew.khmylov@gmail.com>
Date:   Sat Jul 12 18:53:02 2014 +0300

    Add Array.map3 and Seq.map3 functions