{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/core-docs/pulls/comments/75006586","id":75006586,"diff_hunk":"@@ -1,4 +1,158 @@\n # Tour of F# #\n \n+The best way to learn about F# is to read and write F# code.  This tour of some of the features of the language will highlight some things and give you some code snippets that you can execute on your machine.  To learn about setting up a development environment, check out [Getting Started](tutorials/getting-started/index.md).\n+\n+There are two primary concepts in F#: functions and types.  This tour will emphasize features of the language which fall into these two concepts.\n+\n+## How to Run the Code Samples\n+\n+>![NOTE]\n+Eventually, this documentation site will have the ability to run these code samples directly in your browser.\n+\n+The quickest way to run these code samples is to use [F# Interactive](tutorials/fsharp-interactive/index.md).  Just copy/paste the code samples and run them there.  Alternatively you can set up a project to compile and run the code as a Console Application in [Visual Studio](tutorials/getting-started/getting-started-visual-studio.md) or [Visual Studio Code and Ionide](tutorials/getting-started/getting-started-vscode.md).\n+\n+## Functions and Modules\n+\n+The most fundamental pieces of any F# program are Functions organized into Modules.  [Functions](language-reference/functions/index.md) perform work on inputs to produce outputs, and they are organized under Modules, which are the primary way you group things in F#.  They are defined using the [`let` binding](language-reference/functions/let-bindings.md), which give the function a name and define its arguments.\n+\n+[!code-fsharp[BasicFunctions](../../samples/snippets/fsharp/tour.fs#L25-L51)]\n+\n+`let` bindings are also how you bind a value to a name, similar to a variable in other languages.  However, unlike language such as C#, these values are immutable by default.  The lines between values and functions are a bit blurred, and that's intentional.  More on that later.\n+\n+## Integers, Booleans, and Strings\n+\n+As a .NET language, F# supports the same underlying [primitive types](language-reference/primitive-types.md) that exist in .NET.\n+\n+Here's some Integer values, generated in different ways:\n+\n+[!code-fsharp[Integers](../../samples/snippets/fsharp/tour.fs#L8-L22)]\n+\n+Here's what Boolean values and performing basic conditional logic looks like:\n+\n+[!code-fsharp[Bools](../../samples/snippets/fsharp/tour.fs#L59-L66)]\n+\n+And here's what basic [string](language-reference/strings.md) manipulation looks like:\n+\n+[!code-fsharp[Strings](../../samples/snippets/fsharp/tour.fs#L74-L90)]\n+\n+## Tuples\n+\n+[Tuples](language-reference/tuples.md) are a big deal in F#.  They are a grouping of unnamed, but ordered values, that can be treated as values themselves.  Think of them as values which are aggregated from other values.  They have many uses, such as conveniently returning multiple values from a function, or grouping values for some ad-hoc convenience.\n+\n+[!code-fsharp[Tuples](../../samples/snippets/fsharp/tour.fs#L98-L112)]\n+\n+You can also use *struct tuples* with the `struct` keyword.  This tells the compiler that the tuple is allocated on the program Stack, rather than the program Heap.  This is helpful for some high-performance scenarios.\n+\n+[!code-fsharp[Tuples](../../samples/snippets/fsharp/tour.fs#L114-L121)]\n+\n+Note that struct tuples and \"regular\" tuples are distinct types.  You cannot \"fool\" the compiler into thinking one is the other.  Instead, you must explicitly transfer the values from one tuple type to the other if you wish to work with both types of tuples.\n+\n+## Arrays, Lists, and Sequences\n+\n+Arrays, Lists, and Sequences are three primary collection types in the F# core library.\n+\n+[Arrays](language-reference/arrays.md) are fixed-size, *mutable* collections of elements of the same type.  They are also all loaded into memory, thus they support fast random access of elements.","path":"docs/fsharp/tour.md","position":54,"original_position":54,"commit_id":"3e9a6c0b2a43599bf0f960e0824588c544064a4d","original_commit_id":"3e9a6c0b2a43599bf0f960e0824588c544064a4d","user":{"login":"cartermp","id":6309070,"avatar_url":"https://avatars.githubusercontent.com/u/6309070?v=3","gravatar_id":"","url":"https://api.github.com/users/cartermp","html_url":"https://github.com/cartermp","followers_url":"https://api.github.com/users/cartermp/followers","following_url":"https://api.github.com/users/cartermp/following{/other_user}","gists_url":"https://api.github.com/users/cartermp/gists{/gist_id}","starred_url":"https://api.github.com/users/cartermp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cartermp/subscriptions","organizations_url":"https://api.github.com/users/cartermp/orgs","repos_url":"https://api.github.com/users/cartermp/repos","events_url":"https://api.github.com/users/cartermp/events{/privacy}","received_events_url":"https://api.github.com/users/cartermp/received_events","type":"User","site_admin":false},"body":"I was going for some sort of comparison with sequences, which does involve being loaded into a contiguous block of virtual memory, but that was kind of a silly approach to being with now that I'm reading it again.","created_at":"2016-08-16T19:48:43Z","updated_at":"2016-08-16T19:48:43Z","html_url":"https://github.com/dotnet/core-docs/pull/908#discussion_r75006586","pull_request_url":"https://api.github.com/repos/dotnet/core-docs/pulls/908","_links":{"self":{"href":"https://api.github.com/repos/dotnet/core-docs/pulls/comments/75006586"},"html":{"href":"https://github.com/dotnet/core-docs/pull/908#discussion_r75006586"},"pull_request":{"href":"https://api.github.com/repos/dotnet/core-docs/pulls/908"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/core-docs/pulls/908","id":81391387,"html_url":"https://github.com/dotnet/core-docs/pull/908","diff_url":"https://github.com/dotnet/core-docs/pull/908.diff","patch_url":"https://github.com/dotnet/core-docs/pull/908.patch","issue_url":"https://api.github.com/repos/dotnet/core-docs/issues/908","number":908,"state":"open","locked":false,"title":"Tour of F#","user":{"login":"cartermp","id":6309070,"avatar_url":"https://avatars.githubusercontent.com/u/6309070?v=3","gravatar_id":"","url":"https://api.github.com/users/cartermp","html_url":"https://github.com/cartermp","followers_url":"https://api.github.com/users/cartermp/followers","following_url":"https://api.github.com/users/cartermp/following{/other_user}","gists_url":"https://api.github.com/users/cartermp/gists{/gist_id}","starred_url":"https://api.github.com/users/cartermp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cartermp/subscriptions","organizations_url":"https://api.github.com/users/cartermp/orgs","repos_url":"https://api.github.com/users/cartermp/repos","events_url":"https://api.github.com/users/cartermp/events{/privacy}","received_events_url":"https://api.github.com/users/cartermp/received_events","type":"User","site_admin":false},"body":"This is the first article/tutorial which addresses some of the holes we have in our F# conceptual content.  The code sample which is extensively pulled from in the article is a modified version of the F# Tutorial project that ships in VS.\r\n\r\nI'd love to get feedback, particular on the flow of the content.\r\n\r\n/cc @BillWagner @dsyme","created_at":"2016-08-15T23:12:34Z","updated_at":"2016-08-16T19:48:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2e5255196366697e8c0e59fc17a42e43e05bf35f","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/core-docs/pulls/908/commits","review_comments_url":"https://api.github.com/repos/dotnet/core-docs/pulls/908/comments","review_comment_url":"https://api.github.com/repos/dotnet/core-docs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/core-docs/issues/908/comments","statuses_url":"https://api.github.com/repos/dotnet/core-docs/statuses/3e9a6c0b2a43599bf0f960e0824588c544064a4d","head":{"label":"cartermp:update-fs","ref":"update-fs","sha":"3e9a6c0b2a43599bf0f960e0824588c544064a4d","user":{"login":"cartermp","id":6309070,"avatar_url":"https://avatars.githubusercontent.com/u/6309070?v=3","gravatar_id":"","url":"https://api.github.com/users/cartermp","html_url":"https://github.com/cartermp","followers_url":"https://api.github.com/users/cartermp/followers","following_url":"https://api.github.com/users/cartermp/following{/other_user}","gists_url":"https://api.github.com/users/cartermp/gists{/gist_id}","starred_url":"https://api.github.com/users/cartermp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cartermp/subscriptions","organizations_url":"https://api.github.com/users/cartermp/orgs","repos_url":"https://api.github.com/users/cartermp/repos","events_url":"https://api.github.com/users/cartermp/events{/privacy}","received_events_url":"https://api.github.com/users/cartermp/received_events","type":"User","site_admin":false},"repo":{"id":44759105,"name":"core-docs","full_name":"cartermp/core-docs","owner":{"login":"cartermp","id":6309070,"avatar_url":"https://avatars.githubusercontent.com/u/6309070?v=3","gravatar_id":"","url":"https://api.github.com/users/cartermp","html_url":"https://github.com/cartermp","followers_url":"https://api.github.com/users/cartermp/followers","following_url":"https://api.github.com/users/cartermp/following{/other_user}","gists_url":"https://api.github.com/users/cartermp/gists{/gist_id}","starred_url":"https://api.github.com/users/cartermp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cartermp/subscriptions","organizations_url":"https://api.github.com/users/cartermp/orgs","repos_url":"https://api.github.com/users/cartermp/repos","events_url":"https://api.github.com/users/cartermp/events{/privacy}","received_events_url":"https://api.github.com/users/cartermp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cartermp/core-docs","description":".NET Core documentation (work in progress).","fork":true,"url":"https://api.github.com/repos/cartermp/core-docs","forks_url":"https://api.github.com/repos/cartermp/core-docs/forks","keys_url":"https://api.github.com/repos/cartermp/core-docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cartermp/core-docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cartermp/core-docs/teams","hooks_url":"https://api.github.com/repos/cartermp/core-docs/hooks","issue_events_url":"https://api.github.com/repos/cartermp/core-docs/issues/events{/number}","events_url":"https://api.github.com/repos/cartermp/core-docs/events","assignees_url":"https://api.github.com/repos/cartermp/core-docs/assignees{/user}","branches_url":"https://api.github.com/repos/cartermp/core-docs/branches{/branch}","tags_url":"https://api.github.com/repos/cartermp/core-docs/tags","blobs_url":"https://api.github.com/repos/cartermp/core-docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cartermp/core-docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cartermp/core-docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/cartermp/core-docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cartermp/core-docs/statuses/{sha}","languages_url":"https://api.github.com/repos/cartermp/core-docs/languages","stargazers_url":"https://api.github.com/repos/cartermp/core-docs/stargazers","contributors_url":"https://api.github.com/repos/cartermp/core-docs/contributors","subscribers_url":"https://api.github.com/repos/cartermp/core-docs/subscribers","subscription_url":"https://api.github.com/repos/cartermp/core-docs/subscription","commits_url":"https://api.github.com/repos/cartermp/core-docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/cartermp/core-docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/cartermp/core-docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/cartermp/core-docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/cartermp/core-docs/contents/{+path}","compare_url":"https://api.github.com/repos/cartermp/core-docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cartermp/core-docs/merges","archive_url":"https://api.github.com/repos/cartermp/core-docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cartermp/core-docs/downloads","issues_url":"https://api.github.com/repos/cartermp/core-docs/issues{/number}","pulls_url":"https://api.github.com/repos/cartermp/core-docs/pulls{/number}","milestones_url":"https://api.github.com/repos/cartermp/core-docs/milestones{/number}","notifications_url":"https://api.github.com/repos/cartermp/core-docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cartermp/core-docs/labels{/name}","releases_url":"https://api.github.com/repos/cartermp/core-docs/releases{/id}","deployments_url":"https://api.github.com/repos/cartermp/core-docs/deployments","created_at":"2015-10-22T16:41:05Z","updated_at":"2016-06-24T17:41:37Z","pushed_at":"2016-08-16T16:20:40Z","git_url":"git://github.com/cartermp/core-docs.git","ssh_url":"git@github.com:cartermp/core-docs.git","clone_url":"https://github.com/cartermp/core-docs.git","svn_url":"https://github.com/cartermp/core-docs","homepage":"http://dotnet.readthedocs.org","size":16446,"stargazers_count":0,"watchers_count":0,"language":"PowerShell","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dotnet:master","ref":"master","sha":"ee1abc373ccbe139ce7d025fa85b853d21ab76f5","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":35890081,"name":"core-docs","full_name":"dotnet/core-docs","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotnet/core-docs","description":"This repository contains .NET Documentation.","fork":false,"url":"https://api.github.com/repos/dotnet/core-docs","forks_url":"https://api.github.com/repos/dotnet/core-docs/forks","keys_url":"https://api.github.com/repos/dotnet/core-docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/core-docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/core-docs/teams","hooks_url":"https://api.github.com/repos/dotnet/core-docs/hooks","issue_events_url":"https://api.github.com/repos/dotnet/core-docs/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/core-docs/events","assignees_url":"https://api.github.com/repos/dotnet/core-docs/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/core-docs/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/core-docs/tags","blobs_url":"https://api.github.com/repos/dotnet/core-docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/core-docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/core-docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/core-docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/core-docs/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/core-docs/languages","stargazers_url":"https://api.github.com/repos/dotnet/core-docs/stargazers","contributors_url":"https://api.github.com/repos/dotnet/core-docs/contributors","subscribers_url":"https://api.github.com/repos/dotnet/core-docs/subscribers","subscription_url":"https://api.github.com/repos/dotnet/core-docs/subscription","commits_url":"https://api.github.com/repos/dotnet/core-docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/core-docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/core-docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/core-docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/core-docs/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/core-docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/core-docs/merges","archive_url":"https://api.github.com/repos/dotnet/core-docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/core-docs/downloads","issues_url":"https://api.github.com/repos/dotnet/core-docs/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/core-docs/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/core-docs/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/core-docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/core-docs/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/core-docs/releases{/id}","deployments_url":"https://api.github.com/repos/dotnet/core-docs/deployments","created_at":"2015-05-19T15:13:32Z","updated_at":"2016-08-15T17:25:19Z","pushed_at":"2016-08-16T19:27:40Z","git_url":"git://github.com/dotnet/core-docs.git","ssh_url":"git@github.com:dotnet/core-docs.git","clone_url":"https://github.com/dotnet/core-docs.git","svn_url":"https://github.com/dotnet/core-docs","homepage":"https://docs.microsoft.com/dotnet","size":20489,"stargazers_count":213,"watchers_count":213,"language":"PowerShell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":270,"mirror_url":null,"open_issues_count":160,"forks":270,"open_issues":160,"watchers":213,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/core-docs/pulls/908"},"html":{"href":"https://github.com/dotnet/core-docs/pull/908"},"issue":{"href":"https://api.github.com/repos/dotnet/core-docs/issues/908"},"comments":{"href":"https://api.github.com/repos/dotnet/core-docs/issues/908/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/core-docs/pulls/908/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/core-docs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/core-docs/pulls/908/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/core-docs/statuses/3e9a6c0b2a43599bf0f960e0824588c544064a4d"}}}}
{"actor":{"display_login":"cartermp"}}