{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# The F# Notebook Programming Model\n", "\n", "F# Notebooks are written using the F# notebook programming model, a variation on the F# scripting programming model used for `.fsx` scripts and familiar to many F# users.\n", " \n", "This article documents the ways that this programming model differs from normal F# scripting.\n", " \n", "### Standard open namespaces and referenced packages\n", "\n", "The following assemblies or packages are referenced by default:\n", "\n", "* `.NETStandard.Library`\n", "* `FSharp.Core`\n", "* `Microsoft.AspNetCore.Html.Abstractions`\n", "* `Microsoft.DotNet.Interactive`\n", "* `Microsoft.DotNet.Interactive.Formatting`\n", "* `Microsoft.DotNet.Interactive.FSharp`\n", "\n", "The following namespaces are opened by default:\n", "\n", "* `FSharp.Core`\n", "* `FSharp.Control`\n", "* `FSharp.Collections`\n", "* `System`\n", "* `System.IO`\n", "* `System.Text`\n", "* `Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers`\n", "\n", "Note that the final four are extra namespaces available by default in the F# notebook programming model that are not available by default in the F# scripting model.\n", " \n", "### Referencing packages\n", "\n", "See [Referencing packages](Importing-packages.ipynb) for how package references differ.\n", "\n", "### Displaying outputs\n", "\n", "See [Displaying outputs](Displaying-output.ipynb).\n", "\n", "### Formatting outputs\n", "\n", "See [Formatting outputs](Formatting-outputs.ipynb).\n", " \n", "### The `fsi` object and formatting outputs\n", "\n", "Currently the `fsi` object is not available by default and neither `fsi.AddPrinter` nor `fsi.AddHtmlPrinter` are supported. See [Formatting outputs](Formatting-outputs.ipynb)\n", "for how to register plain text and HTML formatters.\n", "\n", "\n", " \n" ] } ], "metadata": { "kernelspec": { "display_name": ".NET (F#)", "language": "F#", "name": ".net-fsharp" }, "language_info": { "file_extension": ".fs", "mimetype": "text/x-fsharp", "name": "C#", "pygments_lexer": "fsharp", "version": "4.5" } }, "nbformat": 4, "nbformat_minor": 2 }