CINXE.COM

F Sharp - Wikipedia, la enciclopedia libre

<!DOCTYPE html> <html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-toc-available" lang="es" dir="ltr"> <head> <meta charset="UTF-8"> <title>F Sharp - Wikipedia, la enciclopedia libre</title> <script>(function(){var className="client-js vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-toc-available";var cookie=document.cookie.match(/(?:^|; )eswikimwclientpreferences=([^;]+)/);if(cookie){cookie[1].split('%2C').forEach(function(pref){className=className.replace(new RegExp('(^| )'+pref.replace(/-clientpref-\w+$|[^\w-]+/g,'')+'-clientpref-\\w+( |$)'),'$1'+pref+'$2');});}document.documentElement.className=className;}());RLCONF={"wgBreakFrames":false,"wgSeparatorTransformTable":[",\t."," \t,"],"wgDigitTransformTable":["",""], "wgDefaultDateFormat":"dmy","wgMonthNames":["","enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],"wgRequestId":"16ab9529-8883-41e1-9825-599a0a1becd9","wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"F_Sharp","wgTitle":"F Sharp","wgCurRevisionId":162311759,"wgRevisionId":162311759,"wgArticleId":1868680,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["Wikipedia:Título erróneo","Plataforma .NET","Lenguajes de programación multiparadigma","Código abierto","Software que utiliza la licencia Apache"],"wgPageViewLanguage":"es","wgPageContentLanguage":"es","wgPageContentModel":"wikitext","wgRelevantPageName":"F_Sharp","wgRelevantArticleId":1868680,"wgIsProbablyEditable":true,"wgRelevantPageIsProbablyEditable":true,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgNoticeProject":"wikipedia", "wgCiteReferencePreviewsActive":false,"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":true,"wgPopupsFlags":0,"wgVisualEditor":{"pageLanguageCode":"es","pageLanguageDir":"ltr","pageVariantFallbacks":"es"},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":true,"nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":20000,"wgRelatedArticlesCompat":[],"wgCentralAuthMobileDomain":false,"wgEditSubmitButtonLabelPublish":true,"wgULSPosition":"interlanguage","wgULSisCompactLinksEnabled":false,"wgVector2022LanguageInHeader":true,"wgULSisLanguageSelectorEmpty":false,"wgWikibaseItemId":"Q648619","wgCheckUserClientHintsHeadersJsApi":["brands","architecture","bitness","fullVersionList","mobile","model","platform","platformVersion"],"GEHomepageSuggestedEditsEnableTopics":true,"wgGETopicsMatchModeEnabled":true,"wgGEStructuredTaskRejectionReasonTextInputEnabled":false,"wgGELevelingUpEnabledForUser":false};RLSTATE={"ext.gadget.imagenesinfobox": "ready","ext.globalCssJs.user.styles":"ready","site.styles":"ready","user.styles":"ready","ext.globalCssJs.user":"ready","user":"ready","user.options":"loading","ext.cite.styles":"ready","ext.pygments":"ready","skins.vector.search.codex.styles":"ready","skins.vector.styles":"ready","skins.vector.icons":"ready","ext.wikimediamessages.styles":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","ext.uls.interlanguage":"ready","wikibase.client.init":"ready","ext.wikimediaBadges":"ready"};RLPAGEMODULES=["ext.cite.ux-enhancements","ext.pygments.view","mediawiki.page.media","site","mediawiki.page.ready","mediawiki.toc","skins.vector.js","ext.centralNotice.geoIP","ext.centralNotice.startUp","ext.gadget.a-commons-directo","ext.gadget.ReferenceTooltips","ext.gadget.refToolbar","ext.gadget.switcher","ext.urlShortener.toolbar","ext.centralauth.centralautologin","mmv.bootstrap","ext.popups","ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader", "ext.echo.centralauth","ext.eventLogging","ext.wikimediaEvents","ext.navigationTiming","ext.uls.interface","ext.cx.eventlogging.campaigns","ext.cx.uls.quick.actions","wikibase.client.vector-2022","ext.checkUser.clientHints","ext.growthExperiments.SuggestedEditSession","wikibase.sidebar.tracking"];</script> <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.impl(function(){return["user.options@12s5i",function($,jQuery,require,module){mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"}); }];});});</script> <link rel="stylesheet" href="/w/load.php?lang=es&amp;modules=ext.cite.styles%7Cext.pygments%2CwikimediaBadges%7Cext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediamessages.styles%7Cskins.vector.icons%2Cstyles%7Cskins.vector.search.codex.styles%7Cwikibase.client.init&amp;only=styles&amp;skin=vector-2022"> <script async="" src="/w/load.php?lang=es&amp;modules=startup&amp;only=scripts&amp;raw=1&amp;skin=vector-2022"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=es&amp;modules=ext.gadget.imagenesinfobox&amp;only=styles&amp;skin=vector-2022"> <link rel="stylesheet" href="/w/load.php?lang=es&amp;modules=site.styles&amp;only=styles&amp;skin=vector-2022"> <noscript><link rel="stylesheet" href="/w/load.php?lang=es&amp;modules=noscript&amp;only=styles&amp;skin=vector-2022"></noscript> <meta name="generator" content="MediaWiki 1.44.0-wmf.5"> <meta name="referrer" content="origin"> <meta name="referrer" content="origin-when-cross-origin"> <meta name="robots" content="max-image-preview:standard"> <meta name="format-detection" content="telephone=no"> <meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/9/93/FSharp_Logo.png"> <meta property="og:image:width" content="1200"> <meta property="og:image:height" content="831"> <meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/9/93/FSharp_Logo.png"> <meta property="og:image:width" content="800"> <meta property="og:image:height" content="554"> <meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/thumb/9/93/FSharp_Logo.png/640px-FSharp_Logo.png"> <meta property="og:image:width" content="640"> <meta property="og:image:height" content="443"> <meta name="viewport" content="width=1120"> <meta property="og:title" content="F Sharp - Wikipedia, la enciclopedia libre"> <meta property="og:type" content="website"> <link rel="preconnect" href="//upload.wikimedia.org"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//es.m.wikipedia.org/wiki/F_Sharp"> <link rel="alternate" type="application/x-wiki" title="Editar" href="/w/index.php?title=F_Sharp&amp;action=edit"> <link rel="apple-touch-icon" href="/static/apple-touch/wikipedia.png"> <link rel="icon" href="/static/favicon/wikipedia.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/w/rest.php/v1/search" title="Wikipedia (es)"> <link rel="EditURI" type="application/rsd+xml" href="//es.wikipedia.org/w/api.php?action=rsd"> <link rel="canonical" href="https://es.wikipedia.org/wiki/F_Sharp"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/deed.es"> <link rel="alternate" type="application/atom+xml" title="Canal Atom de Wikipedia" href="/w/index.php?title=Especial:CambiosRecientes&amp;feed=atom"> <link rel="dns-prefetch" href="//meta.wikimedia.org" /> <link rel="dns-prefetch" href="//login.wikimedia.org"> </head> <body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject mw-editable page-F_Sharp rootpage-F_Sharp skin-vector-2022 action-view"><a class="mw-jump-link" href="#bodyContent">Ir al contenido</a> <div class="vector-header-container"> <header class="vector-header mw-header"> <div class="vector-header-start"> <nav class="vector-main-menu-landmark" aria-label="Sitio"> <div id="vector-main-menu-dropdown" class="vector-dropdown vector-main-menu-dropdown vector-button-flush-left vector-button-flush-right" > <input type="checkbox" id="vector-main-menu-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-main-menu-dropdown" class="vector-dropdown-checkbox " aria-label="Menú principal" > <label id="vector-main-menu-dropdown-label" for="vector-main-menu-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-menu mw-ui-icon-wikimedia-menu"></span> <span class="vector-dropdown-label-text">Menú principal</span> </label> <div class="vector-dropdown-content"> <div id="vector-main-menu-unpinned-container" class="vector-unpinned-container"> <div id="vector-main-menu" class="vector-main-menu vector-pinnable-element"> <div class="vector-pinnable-header vector-main-menu-pinnable-header vector-pinnable-header-unpinned" data-feature-name="main-menu-pinned" data-pinnable-element-id="vector-main-menu" data-pinned-container-id="vector-main-menu-pinned-container" data-unpinned-container-id="vector-main-menu-unpinned-container" > <div class="vector-pinnable-header-label">Menú principal</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-main-menu.pin">mover a la barra lateral</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-main-menu.unpin">ocultar</button> </div> <div id="p-navigation" class="vector-menu mw-portlet mw-portlet-navigation" > <div class="vector-menu-heading"> Navegación </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-mainpage-description" class="mw-list-item"><a href="/wiki/Wikipedia:Portada" title="Visitar la página principal [z]" accesskey="z"><span>Portada</span></a></li><li id="n-portal" class="mw-list-item"><a href="/wiki/Portal:Comunidad" title="Acerca del proyecto, lo que puedes hacer, dónde encontrar información"><span>Portal de la comunidad</span></a></li><li id="n-currentevents" class="mw-list-item"><a href="/wiki/Portal:Actualidad" title="Encuentra información de contexto sobre acontecimientos actuales"><span>Actualidad</span></a></li><li id="n-recentchanges" class="mw-list-item"><a href="/wiki/Especial:CambiosRecientes" title="Lista de cambios recientes en la wiki [r]" accesskey="r"><span>Cambios recientes</span></a></li><li id="n-newpages" class="mw-list-item"><a href="/wiki/Especial:P%C3%A1ginasNuevas"><span>Páginas nuevas</span></a></li><li id="n-randompage" class="mw-list-item"><a href="/wiki/Especial:Aleatoria" title="Cargar una página al azar [x]" accesskey="x"><span>Página aleatoria</span></a></li><li id="n-help" class="mw-list-item"><a href="/wiki/Ayuda:Contenidos" title="El lugar para aprender"><span>Ayuda</span></a></li><li id="n-bug_in_article" class="mw-list-item"><a href="/wiki/Wikipedia:Informes_de_error"><span>Notificar un error</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> <a href="/wiki/Wikipedia:Portada" class="mw-logo"> <img class="mw-logo-icon" src="/static/images/icons/wikipedia.png" alt="" aria-hidden="true" height="50" width="50"> <span class="mw-logo-container skin-invert"> <img class="mw-logo-wordmark" alt="Wikipedia" src="/static/images/mobile/copyright/wikipedia-wordmark-en.svg" style="width: 7.5em; height: 1.125em;"> <img class="mw-logo-tagline" alt="La enciclopedia libre" src="/static/images/mobile/copyright/wikipedia-tagline-es.svg" width="120" height="13" style="width: 7.5em; height: 0.8125em;"> </span> </a> </div> <div class="vector-header-end"> <div id="p-search" role="search" class="vector-search-box-vue vector-search-box-collapses vector-search-box-show-thumbnail vector-search-box-auto-expand-width vector-search-box"> <a href="/wiki/Especial:Buscar" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only search-toggle" title="Buscar en este wiki [f]" accesskey="f"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>Buscar</span> </a> <div class="vector-typeahead-search-container"> <div class="cdx-typeahead-search cdx-typeahead-search--show-thumbnail cdx-typeahead-search--auto-expand-width"> <form action="/w/index.php" id="searchform" class="cdx-search-input cdx-search-input--has-end-button"> <div id="simpleSearch" class="cdx-search-input__input-wrapper" data-search-loc="header-moved"> <div class="cdx-text-input cdx-text-input--has-start-icon"> <input class="cdx-text-input__input" type="search" name="search" placeholder="Buscar en Wikipedia" aria-label="Buscar en Wikipedia" autocapitalize="sentences" title="Buscar en este wiki [f]" accesskey="f" id="searchInput" > <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="Especial:Buscar"> </div> <button class="cdx-button cdx-search-input__end-button">Buscar</button> </form> </div> </div> </div> <nav class="vector-user-links vector-user-links-wide" aria-label="Herramientas personales"> <div class="vector-user-links-main"> <div id="p-vector-user-menu-preferences" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-userpage" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <nav class="vector-appearance-landmark" aria-label="Apariencia"> <div id="vector-appearance-dropdown" class="vector-dropdown " title="Change the appearance of the page&#039;s font size, width, and color" > <input type="checkbox" id="vector-appearance-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-appearance-dropdown" class="vector-dropdown-checkbox " aria-label="Apariencia" > <label id="vector-appearance-dropdown-label" for="vector-appearance-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-appearance mw-ui-icon-wikimedia-appearance"></span> <span class="vector-dropdown-label-text">Apariencia</span> </label> <div class="vector-dropdown-content"> <div id="vector-appearance-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <div id="p-vector-user-menu-notifications" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-overflow" class="vector-menu mw-portlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="//donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&amp;utm_medium=sidebar&amp;utm_campaign=C13_es.wikipedia.org&amp;uselang=es" class=""><span>Donaciones</span></a> </li> <li id="pt-createaccount-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Especial:Crear_una_cuenta&amp;returnto=F+Sharp" title="Te recomendamos crear una cuenta e iniciar sesión; sin embargo, no es obligatorio" class=""><span>Crear una cuenta</span></a> </li> <li id="pt-login-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Especial:Entrar&amp;returnto=F+Sharp" title="Te recomendamos iniciar sesión, aunque no es obligatorio [o]" accesskey="o" class=""><span>Acceder</span></a> </li> </ul> </div> </div> </div> <div id="vector-user-links-dropdown" class="vector-dropdown vector-user-menu vector-button-flush-right vector-user-menu-logged-out" title="Más opciones" > <input type="checkbox" id="vector-user-links-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-user-links-dropdown" class="vector-dropdown-checkbox " aria-label="Herramientas personales" > <label id="vector-user-links-dropdown-label" for="vector-user-links-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-ellipsis mw-ui-icon-wikimedia-ellipsis"></span> <span class="vector-dropdown-label-text">Herramientas personales</span> </label> <div class="vector-dropdown-content"> <div id="p-personal" class="vector-menu mw-portlet mw-portlet-personal user-links-collapsible-item" title="Menú de usuario" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport" class="user-links-collapsible-item mw-list-item"><a href="//donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&amp;utm_medium=sidebar&amp;utm_campaign=C13_es.wikipedia.org&amp;uselang=es"><span>Donaciones</span></a></li><li id="pt-createaccount" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Especial:Crear_una_cuenta&amp;returnto=F+Sharp" title="Te recomendamos crear una cuenta e iniciar sesión; sin embargo, no es obligatorio"><span class="vector-icon mw-ui-icon-userAdd mw-ui-icon-wikimedia-userAdd"></span> <span>Crear una cuenta</span></a></li><li id="pt-login" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Especial:Entrar&amp;returnto=F+Sharp" title="Te recomendamos iniciar sesión, aunque no es obligatorio [o]" accesskey="o"><span class="vector-icon mw-ui-icon-logIn mw-ui-icon-wikimedia-logIn"></span> <span>Acceder</span></a></li> </ul> </div> </div> <div id="p-user-menu-anon-editor" class="vector-menu mw-portlet mw-portlet-user-menu-anon-editor" > <div class="vector-menu-heading"> Páginas para editores desconectados <a href="/wiki/Ayuda:Introducci%C3%B3n" aria-label="Obtenga más información sobre editar"><span>más información</span></a> </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-anoncontribs" class="mw-list-item"><a href="/wiki/Especial:MisContribuciones" title="Una lista de modificaciones hechas desde esta dirección IP [y]" accesskey="y"><span>Contribuciones</span></a></li><li id="pt-anontalk" class="mw-list-item"><a href="/wiki/Especial:MiDiscusi%C3%B3n" title="Discusión sobre ediciones hechas desde esta dirección IP [n]" accesskey="n"><span>Discusión</span></a></li> </ul> </div> </div> </div> </div> </nav> </div> </header> </div> <div class="mw-page-container"> <div class="mw-page-container-inner"> <div class="vector-sitenotice-container"> <div id="siteNotice"><!-- CentralNotice --></div> </div> <div class="vector-column-start"> <div class="vector-main-menu-container"> <div id="mw-navigation"> <nav id="mw-panel" class="vector-main-menu-landmark" aria-label="Sitio"> <div id="vector-main-menu-pinned-container" class="vector-pinned-container"> </div> </nav> </div> </div> <div class="vector-sticky-pinned-container"> <nav id="mw-panel-toc" aria-label="Contenidos" data-event-name="ui.sidebar-toc" class="mw-table-of-contents-container vector-toc-landmark"> <div id="vector-toc-pinned-container" class="vector-pinned-container"> <div id="vector-toc" class="vector-toc vector-pinnable-element"> <div class="vector-pinnable-header vector-toc-pinnable-header vector-pinnable-header-pinned" data-feature-name="toc-pinned" data-pinnable-element-id="vector-toc" > <h2 class="vector-pinnable-header-label">Contenidos</h2> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-toc.pin">mover a la barra lateral</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-toc.unpin">ocultar</button> </div> <ul class="vector-toc-contents" id="mw-panel-toc-list"> <li id="toc-mw-content-text" class="vector-toc-list-item vector-toc-level-1"> <a href="#" class="vector-toc-link"> <div class="vector-toc-text">Inicio</div> </a> </li> <li id="toc-General" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#General"> <div class="vector-toc-text"> <span class="vector-toc-numb">1</span> <span>General</span> </div> </a> <button aria-controls="toc-General-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Alternar subsección General</span> </button> <ul id="toc-General-sublist" class="vector-toc-list"> <li id="toc-Programación_Funcional" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Programación_Funcional"> <div class="vector-toc-text"> <span class="vector-toc-numb">1.1</span> <span>Programación Funcional</span> </div> </a> <ul id="toc-Programación_Funcional-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Programación_Imperativa" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Programación_Imperativa"> <div class="vector-toc-text"> <span class="vector-toc-numb">1.2</span> <span>Programación Imperativa</span> </div> </a> <ul id="toc-Programación_Imperativa-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Programación_orientada_a_objetos" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Programación_orientada_a_objetos"> <div class="vector-toc-text"> <span class="vector-toc-numb">1.3</span> <span>Programación orientada a objetos</span> </div> </a> <ul id="toc-Programación_orientada_a_objetos-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Programación_Asíncrona" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Programación_Asíncrona"> <div class="vector-toc-text"> <span class="vector-toc-numb">1.4</span> <span>Programación Asíncrona</span> </div> </a> <ul id="toc-Programación_Asíncrona-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Programación_en_Paralelo" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Programación_en_Paralelo"> <div class="vector-toc-text"> <span class="vector-toc-numb">1.5</span> <span>Programación en Paralelo</span> </div> </a> <ul id="toc-Programación_en_Paralelo-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Meta-programación" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Meta-programación"> <div class="vector-toc-text"> <span class="vector-toc-numb">1.6</span> <span>Meta-programación</span> </div> </a> <ul id="toc-Meta-programación-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Information_Rich" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Information_Rich"> <div class="vector-toc-text"> <span class="vector-toc-numb">1.7</span> <span>Information Rich</span> </div> </a> <ul id="toc-Information_Rich-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Agente" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Agente"> <div class="vector-toc-text"> <span class="vector-toc-numb">1.8</span> <span>Agente</span> </div> </a> <ul id="toc-Agente-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Herramientas_de_Desarrollo" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Herramientas_de_Desarrollo"> <div class="vector-toc-text"> <span class="vector-toc-numb">2</span> <span>Herramientas de Desarrollo</span> </div> </a> <ul id="toc-Herramientas_de_Desarrollo-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Áreas_de_Aplicación" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Áreas_de_Aplicación"> <div class="vector-toc-text"> <span class="vector-toc-numb">3</span> <span>Áreas de Aplicación</span> </div> </a> <button aria-controls="toc-Áreas_de_Aplicación-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Alternar subsección Áreas de Aplicación</span> </button> <ul id="toc-Áreas_de_Aplicación-sublist" class="vector-toc-list"> <li id="toc-Programación_Web" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Programación_Web"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.1</span> <span>Programación Web</span> </div> </a> <ul id="toc-Programación_Web-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Scripting" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Scripting"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.2</span> <span>Scripting</span> </div> </a> <ul id="toc-Scripting-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Comunidad_Código_Abierto" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Comunidad_Código_Abierto"> <div class="vector-toc-text"> <span class="vector-toc-numb">4</span> <span>Comunidad Código Abierto</span> </div> </a> <ul id="toc-Comunidad_Código_Abierto-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Ejemplos" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Ejemplos"> <div class="vector-toc-text"> <span class="vector-toc-numb">5</span> <span>Ejemplos</span> </div> </a> <ul id="toc-Ejemplos-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Véase_también" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Véase_también"> <div class="vector-toc-text"> <span class="vector-toc-numb">6</span> <span>Véase también</span> </div> </a> <ul id="toc-Véase_también-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Notas" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Notas"> <div class="vector-toc-text"> <span class="vector-toc-numb">7</span> <span>Notas</span> </div> </a> <ul id="toc-Notas-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Referencias" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Referencias"> <div class="vector-toc-text"> <span class="vector-toc-numb">8</span> <span>Referencias</span> </div> </a> <ul id="toc-Referencias-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Enlaces_externos" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Enlaces_externos"> <div class="vector-toc-text"> <span class="vector-toc-numb">9</span> <span>Enlaces externos</span> </div> </a> <ul id="toc-Enlaces_externos-sublist" class="vector-toc-list"> </ul> </li> </ul> </div> </div> </nav> </div> </div> <div class="mw-content-container"> <main id="content" class="mw-body"> <header class="mw-body-header vector-page-titlebar"> <nav aria-label="Contenidos" class="vector-toc-landmark"> <div id="vector-page-titlebar-toc" class="vector-dropdown vector-page-titlebar-toc vector-button-flush-left" > <input type="checkbox" id="vector-page-titlebar-toc-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-titlebar-toc" class="vector-dropdown-checkbox " aria-label="Cambiar a la tabla de contenidos" > <label id="vector-page-titlebar-toc-label" for="vector-page-titlebar-toc-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-listBullet mw-ui-icon-wikimedia-listBullet"></span> <span class="vector-dropdown-label-text">Cambiar a la tabla de contenidos</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-titlebar-toc-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-main">F Sharp</span></h1> <div id="p-lang-btn" class="vector-dropdown mw-portlet mw-portlet-lang" > <input type="checkbox" id="p-lang-btn-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-lang-btn" class="vector-dropdown-checkbox mw-interlanguage-selector" aria-label="Ir a un artículo en otro idioma. Disponible en 31 idiomas" > <label id="p-lang-btn-label" for="p-lang-btn-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--action-progressive mw-portlet-lang-heading-31" aria-hidden="true" ><span class="vector-icon mw-ui-icon-language-progressive mw-ui-icon-wikimedia-language-progressive"></span> <span class="vector-dropdown-label-text">31 idiomas</span> </label> <div class="vector-dropdown-content"> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="interlanguage-link interwiki-ar mw-list-item"><a href="https://ar.wikipedia.org/wiki/%D8%A5%D9%81_%D8%B4%D8%A7%D8%B1%D8%A8_(%D9%84%D8%BA%D8%A9_%D8%A8%D8%B1%D9%85%D8%AC%D8%A9)" title="إف شارب (لغة برمجة) (árabe)" lang="ar" hreflang="ar" data-title="إف شارب (لغة برمجة)" data-language-autonym="العربية" data-language-local-name="árabe" class="interlanguage-link-target"><span>العربية</span></a></li><li class="interlanguage-link interwiki-ca mw-list-item"><a href="https://ca.wikipedia.org/wiki/F_Sharp" title="F Sharp (catalán)" lang="ca" hreflang="ca" data-title="F Sharp" data-language-autonym="Català" data-language-local-name="catalán" class="interlanguage-link-target"><span>Català</span></a></li><li class="interlanguage-link interwiki-cs mw-list-item"><a href="https://cs.wikipedia.org/wiki/F_Sharp" title="F Sharp (checo)" lang="cs" hreflang="cs" data-title="F Sharp" data-language-autonym="Čeština" data-language-local-name="checo" class="interlanguage-link-target"><span>Čeština</span></a></li><li class="interlanguage-link interwiki-da mw-list-item"><a href="https://da.wikipedia.org/wiki/F_Sharp" title="F Sharp (danés)" lang="da" hreflang="da" data-title="F Sharp" data-language-autonym="Dansk" data-language-local-name="danés" class="interlanguage-link-target"><span>Dansk</span></a></li><li class="interlanguage-link interwiki-de mw-list-item"><a href="https://de.wikipedia.org/wiki/F-Sharp" title="F-Sharp (alemán)" lang="de" hreflang="de" data-title="F-Sharp" data-language-autonym="Deutsch" data-language-local-name="alemán" class="interlanguage-link-target"><span>Deutsch</span></a></li><li class="interlanguage-link interwiki-en mw-list-item"><a href="https://en.wikipedia.org/wiki/F_Sharp_(programming_language)" title="F Sharp (programming language) (inglés)" lang="en" hreflang="en" data-title="F Sharp (programming language)" data-language-autonym="English" data-language-local-name="inglés" class="interlanguage-link-target"><span>English</span></a></li><li class="interlanguage-link interwiki-fa mw-list-item"><a href="https://fa.wikipedia.org/wiki/%D8%A7%D9%81_%D8%B4%D8%A7%D8%B1%D9%BE" title="اف شارپ (persa)" lang="fa" hreflang="fa" data-title="اف شارپ" data-language-autonym="فارسی" data-language-local-name="persa" class="interlanguage-link-target"><span>فارسی</span></a></li><li class="interlanguage-link interwiki-fi mw-list-item"><a href="https://fi.wikipedia.org/wiki/F_sharp" title="F sharp (finés)" lang="fi" hreflang="fi" data-title="F sharp" data-language-autonym="Suomi" data-language-local-name="finés" class="interlanguage-link-target"><span>Suomi</span></a></li><li class="interlanguage-link interwiki-fr mw-list-item"><a href="https://fr.wikipedia.org/wiki/F_Sharp" title="F Sharp (francés)" lang="fr" hreflang="fr" data-title="F Sharp" data-language-autonym="Français" data-language-local-name="francés" class="interlanguage-link-target"><span>Français</span></a></li><li class="interlanguage-link interwiki-he mw-list-item"><a href="https://he.wikipedia.org/wiki/F_sharp" title="F sharp (hebreo)" lang="he" hreflang="he" data-title="F sharp" data-language-autonym="עברית" data-language-local-name="hebreo" class="interlanguage-link-target"><span>עברית</span></a></li><li class="interlanguage-link interwiki-hu mw-list-item"><a href="https://hu.wikipedia.org/wiki/F_Sharp" title="F Sharp (húngaro)" lang="hu" hreflang="hu" data-title="F Sharp" data-language-autonym="Magyar" data-language-local-name="húngaro" class="interlanguage-link-target"><span>Magyar</span></a></li><li class="interlanguage-link interwiki-io mw-list-item"><a href="https://io.wikipedia.org/wiki/F_Sharp_(programifo-linguo)" title="F Sharp (programifo-linguo) (ido)" lang="io" hreflang="io" data-title="F Sharp (programifo-linguo)" data-language-autonym="Ido" data-language-local-name="ido" class="interlanguage-link-target"><span>Ido</span></a></li><li class="interlanguage-link interwiki-it mw-list-item"><a href="https://it.wikipedia.org/wiki/F_Sharp" title="F Sharp (italiano)" lang="it" hreflang="it" data-title="F Sharp" data-language-autonym="Italiano" data-language-local-name="italiano" class="interlanguage-link-target"><span>Italiano</span></a></li><li class="interlanguage-link interwiki-ja mw-list-item"><a href="https://ja.wikipedia.org/wiki/F_Sharp" title="F Sharp (japonés)" lang="ja" hreflang="ja" data-title="F Sharp" data-language-autonym="日本語" data-language-local-name="japonés" class="interlanguage-link-target"><span>日本語</span></a></li><li class="interlanguage-link interwiki-ka mw-list-item"><a href="https://ka.wikipedia.org/wiki/F_Sharp" title="F Sharp (georgiano)" lang="ka" hreflang="ka" data-title="F Sharp" data-language-autonym="ქართული" data-language-local-name="georgiano" class="interlanguage-link-target"><span>ქართული</span></a></li><li class="interlanguage-link interwiki-ko mw-list-item"><a href="https://ko.wikipedia.org/wiki/F_%EC%83%A4%ED%94%84" title="F 샤프 (coreano)" lang="ko" hreflang="ko" data-title="F 샤프" data-language-autonym="한국어" data-language-local-name="coreano" class="interlanguage-link-target"><span>한국어</span></a></li><li class="interlanguage-link interwiki-ml mw-list-item"><a href="https://ml.wikipedia.org/wiki/%E0%B4%8E%E0%B4%AB%E0%B5%8D_%E0%B4%B7%E0%B4%BE%E0%B5%BC%E0%B4%AA%E0%B5%8D%E0%B4%AA%E0%B5%8D_(%E0%B4%AA%E0%B5%8D%E0%B4%B0%E0%B5%8B%E0%B4%97%E0%B5%8D%E0%B4%B0%E0%B4%BE%E0%B4%AE%E0%B4%BF%E0%B4%99%E0%B5%8D_%E0%B4%AD%E0%B4%BE%E0%B4%B7)" title="എഫ് ഷാർപ്പ് (പ്രോഗ്രാമിങ് ഭാഷ) (malayálam)" lang="ml" hreflang="ml" data-title="എഫ് ഷാർപ്പ് (പ്രോഗ്രാമിങ് ഭാഷ)" data-language-autonym="മലയാളം" data-language-local-name="malayálam" class="interlanguage-link-target"><span>മലയാളം</span></a></li><li class="interlanguage-link interwiki-ms mw-list-item"><a href="https://ms.wikipedia.org/wiki/F_Sharp_(bahasa_pengaturcaraan)" title="F Sharp (bahasa pengaturcaraan) (malayo)" lang="ms" hreflang="ms" data-title="F Sharp (bahasa pengaturcaraan)" data-language-autonym="Bahasa Melayu" data-language-local-name="malayo" class="interlanguage-link-target"><span>Bahasa Melayu</span></a></li><li class="interlanguage-link interwiki-nl mw-list-item"><a href="https://nl.wikipedia.org/wiki/F_Sharp" title="F Sharp (neerlandés)" lang="nl" hreflang="nl" data-title="F Sharp" data-language-autonym="Nederlands" data-language-local-name="neerlandés" class="interlanguage-link-target"><span>Nederlands</span></a></li><li class="interlanguage-link interwiki-no mw-list-item"><a href="https://no.wikipedia.org/wiki/F_Sharp" title="F Sharp (noruego bokmal)" lang="nb" hreflang="nb" data-title="F Sharp" data-language-autonym="Norsk bokmål" data-language-local-name="noruego bokmal" class="interlanguage-link-target"><span>Norsk bokmål</span></a></li><li class="interlanguage-link interwiki-pl mw-list-item"><a href="https://pl.wikipedia.org/wiki/F_Sharp" title="F Sharp (polaco)" lang="pl" hreflang="pl" data-title="F Sharp" data-language-autonym="Polski" data-language-local-name="polaco" class="interlanguage-link-target"><span>Polski</span></a></li><li class="interlanguage-link interwiki-pt mw-list-item"><a href="https://pt.wikipedia.org/wiki/F_Sharp" title="F Sharp (portugués)" lang="pt" hreflang="pt" data-title="F Sharp" data-language-autonym="Português" data-language-local-name="portugués" class="interlanguage-link-target"><span>Português</span></a></li><li class="interlanguage-link interwiki-ru mw-list-item"><a href="https://ru.wikipedia.org/wiki/F_Sharp" title="F Sharp (ruso)" lang="ru" hreflang="ru" data-title="F Sharp" data-language-autonym="Русский" data-language-local-name="ruso" class="interlanguage-link-target"><span>Русский</span></a></li><li class="interlanguage-link interwiki-sk mw-list-item"><a href="https://sk.wikipedia.org/wiki/F_Sharp" title="F Sharp (eslovaco)" lang="sk" hreflang="sk" data-title="F Sharp" data-language-autonym="Slovenčina" data-language-local-name="eslovaco" class="interlanguage-link-target"><span>Slovenčina</span></a></li><li class="interlanguage-link interwiki-sr mw-list-item"><a href="https://sr.wikipedia.org/wiki/F_Sharp" title="F Sharp (serbio)" lang="sr" hreflang="sr" data-title="F Sharp" data-language-autonym="Српски / srpski" data-language-local-name="serbio" class="interlanguage-link-target"><span>Српски / srpski</span></a></li><li class="interlanguage-link interwiki-sv mw-list-item"><a href="https://sv.wikipedia.org/wiki/F_Sharp" title="F Sharp (sueco)" lang="sv" hreflang="sv" data-title="F Sharp" data-language-autonym="Svenska" data-language-local-name="sueco" class="interlanguage-link-target"><span>Svenska</span></a></li><li class="interlanguage-link interwiki-th mw-list-item"><a href="https://th.wikipedia.org/wiki/%E0%B8%A0%E0%B8%B2%E0%B8%A9%E0%B8%B2%E0%B9%80%E0%B8%AD%E0%B8%9F%E0%B8%8A%E0%B8%B2%E0%B8%A3%E0%B9%8C%E0%B8%9B" title="ภาษาเอฟชาร์ป (tailandés)" lang="th" hreflang="th" data-title="ภาษาเอฟชาร์ป" data-language-autonym="ไทย" data-language-local-name="tailandés" class="interlanguage-link-target"><span>ไทย</span></a></li><li class="interlanguage-link interwiki-tr mw-list-item"><a href="https://tr.wikipedia.org/wiki/F_Sharp" title="F Sharp (turco)" lang="tr" hreflang="tr" data-title="F Sharp" data-language-autonym="Türkçe" data-language-local-name="turco" class="interlanguage-link-target"><span>Türkçe</span></a></li><li class="interlanguage-link interwiki-uk mw-list-item"><a href="https://uk.wikipedia.org/wiki/F_Sharp" title="F Sharp (ucraniano)" lang="uk" hreflang="uk" data-title="F Sharp" data-language-autonym="Українська" data-language-local-name="ucraniano" class="interlanguage-link-target"><span>Українська</span></a></li><li class="interlanguage-link interwiki-zh mw-list-item"><a href="https://zh.wikipedia.org/wiki/F%E2%99%AF" title="F♯ (chino)" lang="zh" hreflang="zh" data-title="F♯" data-language-autonym="中文" data-language-local-name="chino" class="interlanguage-link-target"><span>中文</span></a></li><li class="interlanguage-link interwiki-zh-yue mw-list-item"><a href="https://zh-yue.wikipedia.org/wiki/F%E2%99%AF" title="F♯ (cantonés)" lang="yue" hreflang="yue" data-title="F♯" data-language-autonym="粵語" data-language-local-name="cantonés" class="interlanguage-link-target"><span>粵語</span></a></li> </ul> <div class="after-portlet after-portlet-lang"><span class="wb-langlinks-edit wb-langlinks-link"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q648619#sitelinks-wikipedia" title="Editar enlaces interlingüísticos" class="wbc-editpage">Editar enlaces</a></span></div> </div> </div> </div> </header> <div class="vector-page-toolbar"> <div class="vector-page-toolbar-container"> <div id="left-navigation"> <nav aria-label="Espacios de nombres"> <div id="p-associated-pages" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-associated-pages" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-nstab-main" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/F_Sharp" title="Ver la página de contenido [c]" accesskey="c"><span>Artículo</span></a></li><li id="ca-talk" class="vector-tab-noicon mw-list-item"><a href="/wiki/Discusi%C3%B3n:F_Sharp" rel="discussion" title="Discusión acerca de la página [t]" accesskey="t"><span>Discusión</span></a></li> </ul> </div> </div> <div id="vector-variants-dropdown" class="vector-dropdown emptyPortlet" > <input type="checkbox" id="vector-variants-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-variants-dropdown" class="vector-dropdown-checkbox " aria-label="Cambiar variante de idioma" > <label id="vector-variants-dropdown-label" for="vector-variants-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">español</span> </label> <div class="vector-dropdown-content"> <div id="p-variants" class="vector-menu mw-portlet mw-portlet-variants emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> </div> </div> </nav> </div> <div id="right-navigation" class="vector-collapsible"> <nav aria-label="Vistas"> <div id="p-views" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-views" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-view" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/F_Sharp"><span>Leer</span></a></li><li id="ca-edit" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=F_Sharp&amp;action=edit" title="Editar esta página [e]" accesskey="e"><span>Editar</span></a></li><li id="ca-history" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=F_Sharp&amp;action=history" title="Versiones anteriores de esta página [h]" accesskey="h"><span>Ver historial</span></a></li> </ul> </div> </div> </nav> <nav class="vector-page-tools-landmark" aria-label="Página de herramientas"> <div id="vector-page-tools-dropdown" class="vector-dropdown vector-page-tools-dropdown" > <input type="checkbox" id="vector-page-tools-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-tools-dropdown" class="vector-dropdown-checkbox " aria-label="Herramientas" > <label id="vector-page-tools-dropdown-label" for="vector-page-tools-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">Herramientas</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-tools-unpinned-container" class="vector-unpinned-container"> <div id="vector-page-tools" class="vector-page-tools vector-pinnable-element"> <div class="vector-pinnable-header vector-page-tools-pinnable-header vector-pinnable-header-unpinned" data-feature-name="page-tools-pinned" data-pinnable-element-id="vector-page-tools" data-pinned-container-id="vector-page-tools-pinned-container" data-unpinned-container-id="vector-page-tools-unpinned-container" > <div class="vector-pinnable-header-label">Herramientas</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-page-tools.pin">mover a la barra lateral</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-page-tools.unpin">ocultar</button> </div> <div id="p-cactions" class="vector-menu mw-portlet mw-portlet-cactions emptyPortlet vector-has-collapsible-items" title="Más opciones" > <div class="vector-menu-heading"> Acciones </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-more-view" class="selected vector-more-collapsible-item mw-list-item"><a href="/wiki/F_Sharp"><span>Leer</span></a></li><li id="ca-more-edit" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=F_Sharp&amp;action=edit" title="Editar esta página [e]" accesskey="e"><span>Editar</span></a></li><li id="ca-more-history" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=F_Sharp&amp;action=history"><span>Ver historial</span></a></li> </ul> </div> </div> <div id="p-tb" class="vector-menu mw-portlet mw-portlet-tb" > <div class="vector-menu-heading"> General </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-whatlinkshere" class="mw-list-item"><a href="/wiki/Especial:LoQueEnlazaAqu%C3%AD/F_Sharp" title="Lista de todas las páginas de la wiki que enlazan aquí [j]" accesskey="j"><span>Lo que enlaza aquí</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/wiki/Especial:CambiosEnEnlazadas/F_Sharp" rel="nofollow" title="Cambios recientes en las páginas que enlazan con esta [k]" accesskey="k"><span>Cambios en enlazadas</span></a></li><li id="t-upload" class="mw-list-item"><a href="//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=es" title="Subir archivos [u]" accesskey="u"><span>Subir archivo</span></a></li><li id="t-specialpages" class="mw-list-item"><a href="/wiki/Especial:P%C3%A1ginasEspeciales" title="Lista de todas las páginas especiales [q]" accesskey="q"><span>Páginas especiales</span></a></li><li id="t-permalink" class="mw-list-item"><a href="/w/index.php?title=F_Sharp&amp;oldid=162311759" title="Enlace permanente a esta versión de la página"><span>Enlace permanente</span></a></li><li id="t-info" class="mw-list-item"><a href="/w/index.php?title=F_Sharp&amp;action=info" title="Más información sobre esta página"><span>Información de la página</span></a></li><li id="t-cite" class="mw-list-item"><a href="/w/index.php?title=Especial:Citar&amp;page=F_Sharp&amp;id=162311759&amp;wpFormIdentifier=titleform" title="Información sobre cómo citar esta página"><span>Citar esta página</span></a></li><li id="t-urlshortener" class="mw-list-item"><a href="/w/index.php?title=Especial:Acortador_de_URL&amp;url=https%3A%2F%2Fes.wikipedia.org%2Fwiki%2FF_Sharp"><span>Obtener URL acortado</span></a></li><li id="t-urlshortener-qrcode" class="mw-list-item"><a href="/w/index.php?title=Especial:QrCode&amp;url=https%3A%2F%2Fes.wikipedia.org%2Fwiki%2FF_Sharp"><span>Descargar código QR</span></a></li> </ul> </div> </div> <div id="p-coll-print_export" class="vector-menu mw-portlet mw-portlet-coll-print_export" > <div class="vector-menu-heading"> Imprimir/exportar </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="coll-create_a_book" class="mw-list-item"><a href="/w/index.php?title=Especial:Libro&amp;bookcmd=book_creator&amp;referer=F+Sharp"><span>Crear un libro</span></a></li><li id="coll-download-as-rl" class="mw-list-item"><a href="/w/index.php?title=Especial:DownloadAsPdf&amp;page=F_Sharp&amp;action=show-download-screen"><span>Descargar como PDF</span></a></li><li id="t-print" class="mw-list-item"><a href="/w/index.php?title=F_Sharp&amp;printable=yes" title="Versión imprimible de esta página [p]" accesskey="p"><span>Versión para imprimir</span></a></li> </ul> </div> </div> <div id="p-wikibase-otherprojects" class="vector-menu mw-portlet mw-portlet-wikibase-otherprojects" > <div class="vector-menu-heading"> En otros proyectos </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="wb-otherproject-link wb-otherproject-commons mw-list-item"><a href="https://commons.wikimedia.org/wiki/Category:F_Sharp_(programming_language)" hreflang="en"><span>Wikimedia Commons</span></a></li><li id="t-wikibase" class="wb-otherproject-link wb-otherproject-wikibase-dataitem mw-list-item"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q648619" title="Enlace al elemento conectado del repositorio de datos [g]" accesskey="g"><span>Elemento de Wikidata</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> </div> </div> </div> <div class="vector-column-end"> <div class="vector-sticky-pinned-container"> <nav class="vector-page-tools-landmark" aria-label="Página de herramientas"> <div id="vector-page-tools-pinned-container" class="vector-pinned-container"> </div> </nav> <nav class="vector-appearance-landmark" aria-label="Apariencia"> <div id="vector-appearance-pinned-container" class="vector-pinned-container"> <div id="vector-appearance" class="vector-appearance vector-pinnable-element"> <div class="vector-pinnable-header vector-appearance-pinnable-header vector-pinnable-header-pinned" data-feature-name="appearance-pinned" data-pinnable-element-id="vector-appearance" data-pinned-container-id="vector-appearance-pinned-container" data-unpinned-container-id="vector-appearance-unpinned-container" > <div class="vector-pinnable-header-label">Apariencia</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-appearance.pin">mover a la barra lateral</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-appearance.unpin">ocultar</button> </div> </div> </div> </nav> </div> </div> <div id="bodyContent" class="vector-body" aria-labelledby="firstHeading" data-mw-ve-target-container> <div class="vector-body-before-content"> <div class="mw-indicators"> </div> <div id="siteSub" class="noprint">De Wikipedia, la enciclopedia libre</div> </div> <div id="contentSub"><div id="mw-content-subtitle"></div></div> <div id="mw-content-text" class="mw-body-content"><div class="mw-content-ltr mw-parser-output" lang="es" dir="ltr"><div class="noprint AP rellink">El título correcto de este artículo es <i><b>F#</b></i>, pero, debido a <a href="/wiki/Wikipedia:Restricciones_t%C3%A9cnicas_en_t%C3%ADtulos" title="Wikipedia:Restricciones técnicas en títulos">limitaciones técnicas</a>, no se puede representar correctamente.</div> <figure class="mw-default-size" typeof="mw:File/Thumb"><a href="/wiki/Archivo:FSharp_Logo.png" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/9/93/FSharp_Logo.png/220px-FSharp_Logo.png" decoding="async" width="220" height="152" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/9/93/FSharp_Logo.png/330px-FSharp_Logo.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/9/93/FSharp_Logo.png/440px-FSharp_Logo.png 2x" data-file-width="667" data-file-height="462" /></a><figcaption>Logo o representación gráfica del F#</figcaption></figure> <p><b>F#</b> (pronunciado <b>F Sharp</b> en inglés) es un <a href="/w/index.php?title=Lenguaje_de_programaci%C3%B3n_multiparadigma&amp;action=edit&amp;redlink=1" class="new" title="Lenguaje de programación multiparadigma (aún no redactado)">lenguaje de programación multiparadigma</a> de <a href="/wiki/C%C3%B3digo_abierto" title="Código abierto">código abierto</a>,<sup id="cite_ref-1" class="reference separada"><a href="#cite_note-1"><span class="corchete-llamada">[</span>1<span class="corchete-llamada">]</span></a></sup>&#8203; para la <a href="/wiki/.NET" class="mw-redirect" title=".NET">plataforma .NET</a>, que conjunta la <a href="/wiki/Programaci%C3%B3n_funcional" title="Programación funcional">programación funcional</a> con las disciplinas <a href="/wiki/Programaci%C3%B3n_imperativa" title="Programación imperativa">imperativa</a> y <a href="/wiki/Programaci%C3%B3n_orientada_a_objetos" title="Programación orientada a objetos">orientada a objetos</a>. Es una variante del lenguaje de programación <a href="/wiki/ML_(lenguaje_de_programaci%C3%B3n)" title="ML (lenguaje de programación)">ML</a> y es compatible con la implementación <a href="/w/index.php?title=Ocaml&amp;action=edit&amp;redlink=1" class="new" title="Ocaml (aún no redactado)">Objective Caml</a>. F# fue inicialmente desarrollado por Don Syme de <a href="/wiki/Microsoft_Research" title="Microsoft Research">Microsoft Research</a>, pero actualmente está siendo desarrollado por la División de Desarrolladores de <a href="/wiki/Microsoft" title="Microsoft">Microsoft</a> y es distribuido como un lenguaje totalmente soportado en la <a href="/wiki/.NET" class="mw-redirect" title=".NET">plataforma .NET</a> y <a href="/wiki/Microsoft_Visual_Studio" title="Microsoft Visual Studio">Visual Studio 2010, 2012, 2013, 2015 y 2017</a>.<sup id="cite_ref-2" class="reference separada"><a href="#cite_note-2"><span class="corchete-llamada">[</span>2<span class="corchete-llamada">]</span></a></sup>&#8203; </p><p>F# es un lenguaje fuertemente tipado que utiliza inferencia de tipos. Como resultado, los tipos no necesitan estar declarados explícitamente por el programador; estos serán deducidos por el compilador durante el proceso de compilación. Sin embargo, F# también permite la declaración explícita de tipos de datos. Por ser un lenguaje .NET, F# soporta los objetos y tipos de .NET; F# permite al programador programar de una manera que se asemeja más a como pensamos. Por ejemplo: en la cafetería para pedir un café, nosotros generalmente no le decimos al mesero exactamente los pasos para hacer el café, solo pedimos un café con ciertas características. De tal forma que tenemos menos espacio para cometer errores, porque simplemente escribimos menos código. También facilita enormemente la creación de código asincrónico y paralelo, cosa que en otros lenguajes de .NET nos llevaría mucho más tiempo. </p> <meta property="mw:PageProp/toc" /> <div class="mw-heading mw-heading2"><h2 id="General">General</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=F_Sharp&amp;action=edit&amp;section=1" title="Editar sección: General"><span>editar</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="mw-heading mw-heading3"><h3 id="Programación_Funcional"><span id="Programaci.C3.B3n_Funcional"></span>Programación Funcional</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=F_Sharp&amp;action=edit&amp;section=2" title="Editar sección: Programación Funcional"><span>editar</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>F# es un lenguaje de programación primeramente funcional, fuertemente tipado, que usa la inferencia de tipos. Los tipos no necesitan ser explícitamente declarados por el programador; serán deducidos en proceso de compilación. F# también permite notaciones explícitas de tipos y requiere de esto en algunas situaciones. F# es un lenguaje de expresiones basadas en evaluación impaciente. Las funciones y expresiones que no retornan ningún valor tienen como tipo de retorno <code>unit</code>. F# usa la palabra clave <code>let</code> para enlazar valores a nombres. Por ejemplo: </p> <div class="mw-highlight mw-highlight-lang-fsharp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">let</span><span class="w"> </span><span class="nv">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">3</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">4</span> </pre></div> <p>enlaza el valor <code>7</code> al nombre <code>x</code>. </p><p>Nuevos tipos son definidos usando la palabra clave <code>type</code>. Para una programación funcional, F# provee los tipos <i>tuple</i>, <i>record</i>, <i>discriminated union</i>, <i>list</i> y <i>option</i>. Una <i><a href="/w/index.php?title=N-tuple&amp;action=edit&amp;redlink=1" class="new" title="N-tuple (aún no redactado)">tupla</a></i> representa una colección de <i>n</i> valores. El valor <i>n</i> es llamado la <a href="/wiki/Aridad" title="Aridad">aridad</a> de la tupla. Una 3-tuple podría ser representado como <code>(A, B, C)</code>, donde A, B y C son valores con posiblemente diferente tipos. Una tupla puede ser usada solamente para almacenar valores cuando el número de valores es conocido en tiempo de diseño y permanece constante durante la ejecución. </p><p>Un <i>record</i> es un tipo donde los datos son nombrados, por ejemplo: <code>{ Name:string; Age:int }</code>. Los récords pueden ser creados como <code>{ Name="AB"; Age=42 }</code>. La palabra clave <code>with</code> es usada para crear una copia de un récord, por ejemplo: <code>{ r with Name="CD" }</code>, el cual crea un nuevo récord copiando <code>r</code> y cambiando el valor del campo <code>Name</code> (asumiendo que el récord creado en el ejemplo anterior fue nombrado <code>r</code>). </p><p>Un tipo <a href="/w/index.php?title=Tagged_union&amp;action=edit&amp;redlink=1" class="new" title="Tagged union (aún no redactado)">discriminated union</a> es un <a href="/w/index.php?title=Type-safe&amp;action=edit&amp;redlink=1" class="new" title="Type-safe (aún no redactado)">type-safe</a> versión de <a href="/w/index.php?title=Union_(computer_science)&amp;action=edit&amp;redlink=1" class="new" title="Union (computer science) (aún no redactado)">las uniones de C</a>. </p><p>Por ejemplo: </p> <div class="mw-highlight mw-highlight-lang-fsharp mw-content-ltr" dir="ltr"><pre><span></span><span class="w"> </span><span class="k">type</span><span class="w"> </span><span class="nc">A</span><span class="w"> </span><span class="o">=</span><span class="w"> </span> <span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">UnionCaseX</span><span class="w"> </span><span class="k">of</span><span class="w"> </span><span class="kt">string</span> <span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">UnionCaseY</span><span class="w"> </span><span class="k">of</span><span class="w"> </span><span class="n">int</span> </pre></div> <p>Los valores de la unión pueden corresponder a cualquiera de los dos casos de unión. Los tipos de los valores de cada caso de unión es incluido en la definición de cada caso. El tipo <i>list</i> es una <a href="/w/index.php?title=Linked_list&amp;action=edit&amp;redlink=1" class="new" title="Linked list (aún no redactado)">lista enlazada</a> inmutable representada usando la notación <code>head::tail</code> (<code>::</code> el operador <a href="/w/index.php?title=Cons&amp;action=edit&amp;redlink=1" class="new" title="Cons (aún no redactado)">cons</a>) o de forma de encabezado corto <code>[item1; item2; item3]</code>. Una lista vacía se denota como <code>[]</code>. El tipo <i>option</i> es un tipo de unión discriminada con elección <code>Some(x)</code> o <code>None</code>. Los tipos de F# pueden ser <a href="/w/index.php?title=Generic_programming&amp;action=edit&amp;redlink=1" class="new" title="Generic programming (aún no redactado)">genéricos</a>, implementado como tipos genéricos de .NET. </p><p>F# soporta <a href="/wiki/Lambda_calculus" class="mw-redirect" title="Lambda calculus">funciones lambda</a> y <a href="/w/index.php?title=Closure_(computing)&amp;action=edit&amp;redlink=1" class="new" title="Closure (computing) (aún no redactado)">clausuras</a>. Todas las funciones en F# son inmutables. Las funciones pueden ser <a href="/w/index.php?title=Curry_function&amp;action=edit&amp;redlink=1" class="new" title="Curry function (aún no redactado)">curried</a>. Las funciones pueden ser pasadas como argumento a otras funciones. Como otros lenguajes de programación funcional, F# permite <a href="/w/index.php?title=Function_composition&amp;action=edit&amp;redlink=1" class="new" title="Function composition (aún no redactado)">la composición de funciones</a> usando el operador <code>&gt;&gt;</code>. </p><p>F# provee <i>expresiones de secuencia</i><sup id="cite_ref-seq_3-0" class="reference separada"><a href="#cite_note-seq-3"><span class="corchete-llamada">[</span>3<span class="corchete-llamada">]</span></a></sup>&#8203; que define una secuencia <code>seq { ... }</code>, lista <code>[ ... </code></p><p><code>]</code> o array <code>[| ... |]</code> a través de código que genera valores. Por ejemplo: </p> <div class="mw-highlight mw-highlight-lang-fsharp mw-content-ltr" dir="ltr"><pre><span></span><span class="w"> </span><span class="n">seq</span><span class="w"> </span><span class="o">{</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">b</span><span class="w"> </span><span class="k">in</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="o">..</span><span class="w"> </span><span class="mi">25</span><span class="w"> </span><span class="k">do</span><span class="w"> </span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="n">b</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="mi">15</span><span class="w"> </span><span class="k">then</span><span class="w"> </span> <span class="w"> </span><span class="k">yield</span><span class="w"> </span><span class="n">b</span><span class="o">*</span><span class="n">b</span><span class="w"> </span><span class="o">}</span> </pre></div> <p>forma una secuencia de los cuadrados de los números de 0 a 14 filtrando afuera por los números que están en un rango de 0 a 25. Las secuencias son generadas a medida que va haciendo falta (i.e. are <a href="/w/index.php?title=Lazy_evaluation&amp;action=edit&amp;redlink=1" class="new" title="Lazy evaluation (aún no redactado)">evaluación lazy</a>), mientras que las listas y arrays son evaluadas impacientemente. F# usa <a href="/w/index.php?title=Pattern_matching&amp;action=edit&amp;redlink=1" class="new" title="Pattern matching (aún no redactado)">pattern matching</a> para enlazar valores a nombres. Pattern matching es también usado cuando se está accediendo a uniones discriminadas. F# también soporta <i>Active Patterns</i> como un pattern matching extendido.<sup id="cite_ref-activePatterns_4-0" class="reference separada"><a href="#cite_note-activePatterns-4"><span class="corchete-llamada">[</span>4<span class="corchete-llamada">]</span></a></sup>&#8203; Este es usado, por ejemplo, cuando existen múltiples formas de matchear con un tipo. F# soporta una sintaxis general para la definición de composiciones llamado <i>computation expressions</i>. Secuencias de expresiones, computaciones asíncronas y consultas son clases particulares de <i>computation expressions</i>. "Computation expressions" son una implementación de <a href="/w/index.php?title=Monad_(functional_programming)&amp;action=edit&amp;redlink=1" class="new" title="Monad (functional programming) (aún no redactado)">monad</a> pattern.<sup id="cite_ref-seq_3-1" class="reference separada"><a href="#cite_note-seq-3"><span class="corchete-llamada">[</span>3<span class="corchete-llamada">]</span></a></sup>&#8203; </p> <div class="mw-heading mw-heading3"><h3 id="Programación_Imperativa"><span id="Programaci.C3.B3n_Imperativa"></span>Programación Imperativa</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=F_Sharp&amp;action=edit&amp;section=3" title="Editar sección: Programación Imperativa"><span>editar</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>F# soporta la programación imperativa e incluye </p> <ul><li><code>for</code> <a href="/w/index.php?title=Control_flow&amp;action=edit&amp;redlink=1" class="new" title="Control flow (aún no redactado)">ciclos</a></li> <li><code>while</code> <a href="/w/index.php?title=Control_flow&amp;action=edit&amp;redlink=1" class="new" title="Control flow (aún no redactado)">ciclos</a></li> <li><a href="/w/index.php?title=Array_data_structure&amp;action=edit&amp;redlink=1" class="new" title="Array data structure (aún no redactado)">arrays</a>, creados con la sintaxis <code>[| ... |]</code></li> <li><a href="/w/index.php?title=Associative_array&amp;action=edit&amp;redlink=1" class="new" title="Associative array (aún no redactado)">hash table</a>, creado con la sintaxis <code>dict [ ... ]</code> o</li></ul> <p><code>System.Collections.Generic.Dictionary&lt;_,_&gt;</code> type). Valores y campos de records también pueden ser etiquetados como <code>mutable</code>. Por ejemplo: </p> <div class="mw-highlight mw-highlight-lang-fsharp mw-content-ltr" dir="ltr"><pre><span></span><span class="c1">// Define &#39;x&#39; con valor inicial &#39;1&#39;</span> <span class="k">let</span><span class="w"> </span><span class="nv">mutable</span><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span> <span class="c1">// Cambia el valor de &#39;x&#39; a &#39;3&#39;</span> <span class="n">x</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="mi">3</span> </pre></div> <p>También, F# soporta acceso a todos los tipos y objetos del CLI como los definidos en: </p><p><code>System.Collections.Generic</code>. </p> <div class="mw-heading mw-heading3"><h3 id="Programación_orientada_a_objetos"><span id="Programaci.C3.B3n_orientada_a_objetos"></span>Programación orientada a objetos</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=F_Sharp&amp;action=edit&amp;section=4" title="Editar sección: Programación orientada a objetos"><span>editar</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>F# como recursos para programar orientado objetos incluye: </p> <ul><li>dot-notation (e.g. <code>x.Name</code>)</li> <li>expresiones de objetos (e.g. <code>{ new obj() with member x.ToString() = "hello" }</code>)</li> <li>construcción de objetos (e.g. <code>new Form()</code>)</li> <li>tipos tests (e.g. <code>x&#160;:? string</code>)</li> <li>type coercions (e.g. <code>x&#160;:?&gt; string</code>)</li> <li>argumentos (e.g. <code>x.Method(someArgument=1)</code>)</li> <li>setters (e.g. <code>new Form(Text="Hello")</code>)</li> <li>argumentos opcionales (e.g. <code>x.Method(OptionalArgument=1)</code></li></ul> <p>En los patterns para programar con objetos se incluye: </p> <ul><li>type tests (e.g. <code>:? string as s</code>)</li> <li>active patterns, el cual puede ser definido sobre tipos de objetos.<sup id="cite_ref-activePatterns_4-1" class="reference separada"><a href="#cite_note-activePatterns-4"><span class="corchete-llamada">[</span>4<span class="corchete-llamada">]</span></a></sup>&#8203;</li></ul> <p>Las definiciones de objetos en F# pueden ser clases, estructuras (struct), interfaz, enum o delegados, correspondiendo a las formas de definición encontradas en <a href="/wiki/C_Sharp" title="C Sharp">C#</a>. Por ejemplo, aquí se muestra una clase con un constructor tomando un nombre y una edad, y declarando dos propiedades. </p> <div class="mw-highlight mw-highlight-lang-fsharp mw-content-ltr" dir="ltr"><pre><span></span><span class="sd">/// Una simple definición de tipo de objeto</span> <span class="k">type</span><span class="w"> </span><span class="nc">Person</span><span class="o">(</span><span class="n">name</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="kt">string</span><span class="o">,</span><span class="w"> </span><span class="n">age</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">int</span><span class="o">)</span><span class="w"> </span><span class="o">=</span> <span class="w"> </span><span class="k">member</span><span class="w"> </span><span class="n">x</span><span class="p">.</span><span class="nf">Name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">name</span> <span class="w"> </span><span class="k">member</span><span class="w"> </span><span class="n">x</span><span class="p">.</span><span class="nf">Age</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">age</span> </pre></div> <div class="mw-heading mw-heading3"><h3 id="Programación_Asíncrona"><span id="Programaci.C3.B3n_As.C3.ADncrona"></span>Programación Asíncrona</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=F_Sharp&amp;action=edit&amp;section=5" title="Editar sección: Programación Asíncrona"><span>editar</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>F# soporta programación asíncrona a través de <i>asynchronous workflows</i>.<sup id="cite_ref-aw_5-0" class="reference separada"><a href="#cite_note-aw-5"><span class="corchete-llamada">[</span>5<span class="corchete-llamada">]</span></a></sup>&#8203; "Asynchronous workflow" es definido como una secuencia de comandos dentro de un <code>async{ ... }</code>, por ejemplo: </p> <div class="mw-highlight mw-highlight-lang-fsharp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">let</span><span class="w"> </span><span class="nv">asynctask</span><span class="w"> </span><span class="o">=</span><span class="w"> </span> <span class="w"> </span><span class="n">async</span><span class="w"> </span><span class="o">{</span><span class="w"> </span><span class="k">let</span><span class="w"> </span><span class="nv">req</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nn">WebRequest</span><span class="p">.</span><span class="n">Create</span><span class="o">(</span><span class="n">url</span><span class="o">)</span><span class="w"> </span> <span class="w"> </span><span class="k">let!</span><span class="w"> </span><span class="nv">response</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">req</span><span class="o">.</span><span class="n">GetResponseAsync</span><span class="bp">()</span> <span class="w"> </span><span class="k">use</span><span class="w"> </span><span class="n">stream</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">response</span><span class="o">.</span><span class="n">GetResponseStream</span><span class="bp">()</span> <span class="w"> </span><span class="k">use</span><span class="w"> </span><span class="n">streamreader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="nn">System</span><span class="p">.</span><span class="nn">IO</span><span class="p">.</span><span class="n">StreamReader</span><span class="o">(</span><span class="n">stream</span><span class="o">)</span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">streamreader</span><span class="o">.</span><span class="n">ReadToEnd</span><span class="bp">()</span> </pre></div> <p>El <code>let!</code> permite que el resto del bloque async pueda ser definido como un delegado y pasado como <a href="/wiki/Callback_(inform%C3%A1tica)" class="mw-redirect" title="Callback (informática)">Callback (informática)</a> de una operación asíncrona. Esto soluciona el problema de la [[inversion of control|inversión de control]].<sup id="cite_ref-aw_5-1" class="reference separada"><a href="#cite_note-aw-5"><span class="corchete-llamada">[</span>5<span class="corchete-llamada">]</span></a></sup>&#8203; El bloque async es invocado usando la función <code>Async.RunSynchronously</code>. Múltiples bloques async son ejecutados en paralelo usando la función <code>Async.Parallel</code> que toma una lista de objetos <code>async</code> (en el ejemplo, <code>asynctask</code> es un objeto async) y crea otro objeto async para correr las tareas en las listas en paralelo. Luego, el objeto resultante es invocado usando <code>Async.RunSynchronously</code>.<sup id="cite_ref-aw_5-2" class="reference separada"><a href="#cite_note-aw-5"><span class="corchete-llamada">[</span>5<span class="corchete-llamada">]</span></a></sup>&#8203; </p> <div class="mw-heading mw-heading3"><h3 id="Programación_en_Paralelo"><span id="Programaci.C3.B3n_en_Paralelo"></span>Programación en Paralelo</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=F_Sharp&amp;action=edit&amp;section=6" title="Editar sección: Programación en Paralelo"><span>editar</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>La programación en paralelo es soportada parcialmente a través de <code>Async.Parallel</code>, <code>Async.Start</code> y otras operaciones que corren bloques asíncronos en paralelo. </p> <div class="mw-heading mw-heading3"><h3 id="Meta-programación"><span id="Meta-programaci.C3.B3n"></span>Meta-programación</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=F_Sharp&amp;action=edit&amp;section=7" title="Editar sección: Meta-programación"><span>editar</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>F# permite algunas formas de <a href="/w/index.php?title=Metaprogramming&amp;action=edit&amp;redlink=1" class="new" title="Metaprogramming (aún no redactado)">sintaxis personalizadas</a> con el fin de darle soporte a un incrustamiento personalizado, particularmente a través de "computation expressions". </p><p>F# incluye un plugin para meta-programación en tiempo de ejecución llamado quotations.<sup id="cite_ref-quotations_6-0" class="reference separada"><a href="#cite_note-quotations-6"><span class="corchete-llamada">[</span>6<span class="corchete-llamada">]</span></a></sup>&#8203; Una expresión quotation evalúa una representación de sintaxis abstracta de expresiones de F#. Una definición etiquetada con el atributo <code>[&lt;ReflectedDefinition&gt;]</code> puede también ser accedida de la forma quotation. Las F# quotations son usadas para varios propósitos incluyendo compilar código F# a <a href="/wiki/JavaScript" title="JavaScript">JavaScript</a> y <a href="/wiki/Graphics_processing_unit" class="mw-redirect" title="Graphics processing unit">GPU</a>. </p> <div class="mw-heading mw-heading3"><h3 id="Information_Rich">Information Rich</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=F_Sharp&amp;action=edit&amp;section=8" title="Editar sección: Information Rich"><span>editar</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>F# 3.0 introdujo una forma de meta-programación en tiempo de compilación a través de una generación de tipos estáticamente extensibles llamados F# type providers.<sup id="cite_ref-typeproviders_7-0" class="reference separada"><a href="#cite_note-typeproviders-7"><span class="corchete-llamada">[</span>7<span class="corchete-llamada">]</span></a></sup>&#8203; F# type providers permite al compilador de F# y herramientas ser extendidas con componentes que proporcionan información de tipo al compilador. F# type providers ha sido usado para dar acceso a tipos fuertemente tipados para conectar el origen de la información en una manera escalable.<sup id="cite_ref-8" class="reference separada"><a href="#cite_note-8"><span class="corchete-llamada">[</span>8<span class="corchete-llamada">]</span></a></sup>&#8203; </p><p>En F# 3.0 el F# quotation y las computation expression son combinadas para implementar consultas <a href="/wiki/LINQ" class="mw-redirect" title="LINQ">LINQ</a>.<sup id="cite_ref-queries_9-0" class="reference separada"><a href="#cite_note-queries-9"><span class="corchete-llamada">[</span>9<span class="corchete-llamada">]</span></a></sup>&#8203; Por ejemplo: </p> <div class="mw-highlight mw-highlight-lang-fsharp mw-content-ltr" dir="ltr"><pre><span></span><span class="c1">// Usa el OData type provider para crear tipos que puedan ser usados para acceder a Northwind database.</span> <span class="k">open</span><span class="w"> </span><span class="nn">Microsoft.FSharp.Data.TypeProviders</span> <span class="k">type</span><span class="w"> </span><span class="nc">Northwind</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ODataService</span><span class="o">&lt;</span><span class="s">&quot;http://services.odata.org/Northwind/Northwind.svc&quot;</span><span class="o">&gt;</span> <span class="k">let</span><span class="w"> </span><span class="nv">db</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nn">Northwind</span><span class="p">.</span><span class="n">GetDataContext</span><span class="bp">()</span> <span class="c1">// A query expression.</span> <span class="k">let</span><span class="w"> </span><span class="nv">query1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">query</span><span class="w"> </span><span class="o">{</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">customer</span><span class="w"> </span><span class="k">in</span><span class="w"> </span><span class="n">db</span><span class="o">.</span><span class="n">Customers</span><span class="w"> </span><span class="k">do</span> <span class="w"> </span><span class="k">select</span><span class="w"> </span><span class="n">customer</span><span class="w"> </span><span class="o">}</span> </pre></div> <p>La combinación de type providers, consultas y programación funcional fuertemente tipado es conocido como <i>information rich</i> programming<i>.<sup id="cite_ref-irp_10-0" class="reference separada"><a href="#cite_note-irp-10"><span class="corchete-llamada">[</span>10<span class="corchete-llamada">]</span></a></sup>&#8203;</i> </p> <div class="mw-heading mw-heading3"><h3 id="Agente">Agente</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=F_Sharp&amp;action=edit&amp;section=9" title="Editar sección: Agente"><span>editar</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>F# soporta una variante del modelo de programación <a href="/w/index.php?title=Actor_model&amp;action=edit&amp;redlink=1" class="new" title="Actor model (aún no redactado)">Actor</a> a través de la implementación en memoria de agentes asíncronos. Por ejemplo, el siguiente código define un agente y envía 2 mensajes: </p> <div class="mw-highlight mw-highlight-lang-fsharp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">let</span><span class="w"> </span><span class="nv">counter</span><span class="w"> </span><span class="o">=</span> <span class="w"> </span><span class="nn">MailboxProcessor</span><span class="p">.</span><span class="n">Start</span><span class="o">(</span><span class="k">fun</span><span class="w"> </span><span class="n">inbox</span><span class="w"> </span><span class="o">-&gt;</span> <span class="w"> </span><span class="k">let</span><span class="w"> </span><span class="nv">rec</span><span class="w"> </span><span class="n">loop</span><span class="w"> </span><span class="n">n</span><span class="w"> </span><span class="o">=</span> <span class="w"> </span><span class="n">async</span><span class="w"> </span><span class="o">{</span><span class="w"> </span><span class="k">do</span><span class="w"> </span><span class="n">printfn</span><span class="w"> </span><span class="s">&quot;n = %d, waiting...&quot;</span><span class="w"> </span><span class="n">n</span> <span class="w"> </span><span class="k">let!</span><span class="w"> </span><span class="nv">msg</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">inbox</span><span class="o">.</span><span class="n">Receive</span><span class="bp">()</span> <span class="w"> </span><span class="k">return</span><span class="o">!</span><span class="w"> </span><span class="n">loop</span><span class="o">(</span><span class="n">n</span><span class="o">+</span><span class="n">msg</span><span class="o">)</span><span class="w"> </span><span class="o">}</span> <span class="w"> </span><span class="n">loop</span><span class="w"> </span><span class="mi">0</span><span class="o">)</span> <span class="n">counter</span><span class="o">.</span><span class="n">Post</span><span class="o">(</span><span class="mi">5</span><span class="o">);;</span> <span class="n">counter</span><span class="o">.</span><span class="n">Post</span><span class="o">(</span><span class="mi">17</span><span class="o">);;</span> </pre></div> <div class="mw-heading mw-heading2"><h2 id="Herramientas_de_Desarrollo">Herramientas de Desarrollo</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=F_Sharp&amp;action=edit&amp;section=10" title="Editar sección: Herramientas de Desarrollo"><span>editar</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>F# puede ser desarrollado con cualquier editor de texto. Hay soportes específicos para el en varios editores, por ejemplo <a href="/wiki/Emacs" class="mw-redirect" title="Emacs">Emacs</a>. </p><p>La herramienta Visual F# de <a href="/wiki/Microsoft" title="Microsoft">Microsoft</a> incluye completa integración en el IDE <a href="/wiki/Microsoft_Visual_Studio" title="Microsoft Visual Studio">Visual Studio</a>. Con el servicio del lenguaje instalado, Visual Studio puede ser usado para crear proyectos de F# y el Visual Studio debugger usado para depurar código F#. Además las herramientas de Visual F# vienen con una consola interactiva que puede ser usada para ejecutar código F# como está siendo escrito. </p><p><a href="/w/index.php?title=WebSharper&amp;action=edit&amp;redlink=1" class="new" title="WebSharper (aún no redactado)">WebSharper</a> es una plataforma para la utilización de JavaScript and HTML5. <a href="/wiki/MonoDevelop" title="MonoDevelop">MonoDevelop</a> es un entorno de desarrollo integrado para Linux, Mac y Windows incluyendo soporte para una consola interactiva. <a href="/wiki/SharpDevelop" title="SharpDevelop">SharpDevelop</a> soporta F# desde la versión 3.0. <a href="/w/index.php?title=LINQPad&amp;action=edit&amp;redlink=1" class="new" title="LINQPad (aún no redactado)">LINQPad</a> soporta F# desde la versión 2.X. </p> <div class="mw-heading mw-heading2"><h2 id="Áreas_de_Aplicación"><span id=".C3.81reas_de_Aplicaci.C3.B3n"></span>Áreas de Aplicación</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=F_Sharp&amp;action=edit&amp;section=11" title="Editar sección: Áreas de Aplicación"><span>editar</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>F# es un <a href="/w/index.php?title=General-purpose_programming_language&amp;action=edit&amp;redlink=1" class="new" title="General-purpose programming language (aún no redactado)">lenguaje de propósito general</a>. </p> <div class="mw-heading mw-heading3"><h3 id="Programación_Web"><span id="Programaci.C3.B3n_Web"></span>Programación Web</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=F_Sharp&amp;action=edit&amp;section=12" title="Editar sección: Programación Web"><span>editar</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>F# es usado en conjunto con ASP.NET, <a href="/w/index.php?title=KnockoutJS&amp;action=edit&amp;redlink=1" class="new" title="KnockoutJS (aún no redactado)">knockoutJS</a> y otros frameworks del lado del servidor y del lado del cliente.<sup id="cite_ref-webstacks_11-0" class="reference separada"><a href="#cite_note-webstacks-11"><span class="corchete-llamada">[</span>11<span class="corchete-llamada">]</span></a></sup>&#8203; </p><p>F# es una parte central del framework <a href="/w/index.php?title=WebSharper&amp;action=edit&amp;redlink=1" class="new" title="WebSharper (aún no redactado)">WebSharper</a> donde el código F# es ejecutado como un código .NET en el servidor y como código <a href="/wiki/JavaScript" title="JavaScript">JavaScript</a> en el lado cliente. </p> <div class="mw-heading mw-heading3"><h3 id="Scripting">Scripting</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=F_Sharp&amp;action=edit&amp;section=13" title="Editar sección: Scripting"><span>editar</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>F# es sobre todo usado como un lenguaje de scripting, principalmente para escritorio.<sup id="cite_ref-12" class="reference separada"><a href="#cite_note-12"><span class="corchete-llamada">[</span>12<span class="corchete-llamada">]</span></a></sup>&#8203; </p> <div class="mw-heading mw-heading2"><h2 id="Comunidad_Código_Abierto"><span id="Comunidad_C.C3.B3digo_Abierto"></span>Comunidad Código Abierto</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=F_Sharp&amp;action=edit&amp;section=14" title="Editar sección: Comunidad Código Abierto"><span>editar</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>La comunidad de código abierto de F# incluye la F# Software Foundation y la F# Open Source Group at GitHub. </p> <div class="mw-heading mw-heading2"><h2 id="Ejemplos">Ejemplos</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=F_Sharp&amp;action=edit&amp;section=15" title="Editar sección: Ejemplos"><span>editar</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Un corto y pequeño ejemplo: </p> <div class="mw-highlight mw-highlight-lang-fsharp mw-content-ltr" dir="ltr"><pre><span></span><span class="c1">// Esto es un comentario para el programa de ejemplo Hello World.</span> <span class="n">printfn</span><span class="w"> </span><span class="s">&quot;Hello World!&quot;</span> </pre></div> <p>Una clase persona con un constructor que espera name, age y dos propiedades. </p> <div class="mw-highlight mw-highlight-lang-fsharp mw-content-ltr" dir="ltr"><pre><span></span><span class="sd">/// Este es el comentario para la documentacion de la definicion de un tipo</span> <span class="k">type</span><span class="w"> </span><span class="nc">Person</span><span class="o">(</span><span class="n">name</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="kt">string</span><span class="o">,</span><span class="w"> </span><span class="n">age</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">int</span><span class="o">)</span><span class="w"> </span><span class="o">=</span> <span class="w"> </span><span class="k">member</span><span class="w"> </span><span class="n">x</span><span class="p">.</span><span class="nf">Name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">name</span> <span class="w"> </span><span class="k">member</span><span class="w"> </span><span class="n">x</span><span class="p">.</span><span class="nf">Age</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">age</span> </pre></div> <p>Un simple ejemplo que es sobre todo usado para demostrar la sintaxis de un lenguaje <a href="/w/index.php?title=Factorial_function&amp;action=edit&amp;redlink=1" class="new" title="Factorial function (aún no redactado)">funcional</a>: </p> <div class="mw-highlight mw-highlight-lang-fsharp mw-content-ltr" dir="ltr"><pre><span></span><span class="sd">/// Este es el comentario para la documentación de una función</span> <span class="k">let</span><span class="w"> </span><span class="nv">rec</span><span class="w"> </span><span class="n">factorial</span><span class="w"> </span><span class="n">n</span><span class="w"> </span><span class="o">=</span> <span class="w"> </span><span class="k">match</span><span class="w"> </span><span class="n">n</span><span class="w"> </span><span class="k">with</span> <span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="mi">1</span> <span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="o">_</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="n">n</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">factorial</span><span class="w"> </span><span class="o">(</span><span class="n">n</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">1</span><span class="o">)</span> </pre></div> <p>Ejemplos de iteraciones: </p> <div class="mw-highlight mw-highlight-lang-fsharp mw-content-ltr" dir="ltr"><pre><span></span><span class="sd">/// Iteración usando un ciclo &#39;for&#39;</span> <span class="k">let</span><span class="w"> </span><span class="nv">printList</span><span class="w"> </span><span class="n">lst</span><span class="w"> </span><span class="o">=</span><span class="w"> </span> <span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="k">in</span><span class="w"> </span><span class="n">lst</span><span class="w"> </span><span class="k">do</span><span class="w"> </span> <span class="w"> </span><span class="n">printfn</span><span class="w"> </span><span class="s">&quot;%d&quot;</span><span class="w"> </span><span class="n">x</span> <span class="sd">/// Iteración usando una función de alto nivel </span> <span class="k">let</span><span class="w"> </span><span class="nv">printList2</span><span class="w"> </span><span class="n">lst</span><span class="w"> </span><span class="o">=</span><span class="w"> </span> <span class="w"> </span><span class="nn">List</span><span class="p">.</span><span class="n">iter</span><span class="w"> </span><span class="o">(</span><span class="n">printfn</span><span class="w"> </span><span class="s">&quot;%d&quot;</span><span class="o">)</span><span class="w"> </span><span class="n">lst</span> <span class="sd">/// Iteración usando una función recursiva y pattern matching</span> <span class="k">let</span><span class="w"> </span><span class="nv">rec</span><span class="w"> </span><span class="n">printList3</span><span class="w"> </span><span class="n">lst</span><span class="w"> </span><span class="o">=</span> <span class="w"> </span><span class="k">match</span><span class="w"> </span><span class="n">lst</span><span class="w"> </span><span class="k">with</span><span class="w"> </span> <span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="bp">[]</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="bp">()</span> <span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">h</span><span class="w"> </span><span class="o">::</span><span class="w"> </span><span class="n">t</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span> <span class="w"> </span><span class="n">printfn</span><span class="w"> </span><span class="s">&quot;%d&quot;</span><span class="w"> </span><span class="n">h</span> <span class="w"> </span><span class="n">printList3</span><span class="w"> </span><span class="n">t</span> </pre></div> <p>Ejemplos de Fibonacci: </p> <div class="mw-highlight mw-highlight-lang-fsharp mw-content-ltr" dir="ltr"><pre><span></span><span class="sd">/// Numero n de fibonacci</span> <span class="k">let</span><span class="w"> </span><span class="nv">rec</span><span class="w"> </span><span class="n">fib</span><span class="w"> </span><span class="n">n</span><span class="w"> </span><span class="o">=</span> <span class="w"> </span><span class="k">match</span><span class="w"> </span><span class="n">n</span><span class="w"> </span><span class="k">with</span> <span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">1</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="n">n</span> <span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="o">_</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="n">fib</span><span class="w"> </span><span class="o">(</span><span class="n">n</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">1</span><span class="o">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">fib</span><span class="w"> </span><span class="o">(</span><span class="n">n</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">2</span><span class="o">)</span> <span class="sd">/// Otra aproximación, una secuencia lazy infinita de fibonacci </span> <span class="k">let</span><span class="w"> </span><span class="nv">fibSeq</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nn">Seq</span><span class="p">.</span><span class="n">unfold</span><span class="w"> </span><span class="o">(</span><span class="k">fun</span><span class="w"> </span><span class="o">(</span><span class="n">a</span><span class="o">,</span><span class="n">b</span><span class="o">)</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="n">Some</span><span class="o">(</span><span class="n">a</span><span class="o">+</span><span class="n">b</span><span class="o">,</span><span class="w"> </span><span class="o">(</span><span class="n">b</span><span class="o">,</span><span class="w"> </span><span class="n">a</span><span class="o">+</span><span class="n">b</span><span class="o">)))</span><span class="w"> </span><span class="o">(</span><span class="mi">1</span><span class="o">,</span><span class="mi">1</span><span class="o">)</span> <span class="c1">// Imprime los números de fibonacci pares </span> <span class="o">[</span><span class="mi">1</span><span class="w"> </span><span class="o">..</span><span class="w"> </span><span class="mi">10</span><span class="o">]</span> <span class="o">|&gt;</span><span class="w"> </span><span class="nn">List</span><span class="p">.</span><span class="n">map</span><span class="w"> </span><span class="n">fib</span> <span class="o">|&gt;</span><span class="w"> </span><span class="nn">List</span><span class="p">.</span><span class="n">filter</span><span class="w"> </span><span class="o">(</span><span class="k">fun</span><span class="w"> </span><span class="n">n</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="o">(</span><span class="n">n</span><span class="w"> </span><span class="o">%</span><span class="w"> </span><span class="mi">2</span><span class="o">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="o">)</span> <span class="o">|&gt;</span><span class="w"> </span><span class="n">printList</span> <span class="c1">// Algunas cosas usando listas</span> <span class="o">[</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="k">in</span><span class="w"> </span><span class="mi">1</span><span class="o">..</span><span class="mi">10</span><span class="w"> </span><span class="k">do</span> <span class="w"> </span><span class="k">let</span><span class="w"> </span><span class="nv">r</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">fib</span><span class="w"> </span><span class="n">i</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="n">r</span><span class="w"> </span><span class="o">%</span><span class="w"> </span><span class="mi">2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="k">then</span><span class="w"> </span><span class="k">yield</span><span class="w"> </span><span class="n">r</span><span class="w"> </span><span class="o">]</span> <span class="o">|&gt;</span><span class="w"> </span><span class="n">printList</span> </pre></div> <p>Un ejemplo con Windows Forms: </p> <div class="mw-highlight mw-highlight-lang-fsharp mw-content-ltr" dir="ltr"><pre><span></span><span class="c1">// Abre la librería Windows Forms </span> <span class="k">open</span><span class="w"> </span><span class="nn">System.Windows.Forms</span> <span class="c1">// Crea una ventana y setea algunas propiedades </span> <span class="k">let</span><span class="w"> </span><span class="nv">form</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Form</span><span class="o">(</span><span class="n">Visible</span><span class="o">=</span><span class="k">true</span><span class="o">,</span><span class="w"> </span><span class="n">TopMost</span><span class="o">=</span><span class="k">true</span><span class="o">,</span><span class="w"> </span><span class="n">Text</span><span class="o">=</span><span class="s">&quot;Welcome to F#&quot;</span><span class="o">)</span> <span class="c1">// Crea una etiqueta para mostrar algún texto en el formulario </span> <span class="k">let</span><span class="w"> </span><span class="nv">label</span><span class="w"> </span><span class="o">=</span> <span class="w"> </span><span class="k">let</span><span class="w"> </span><span class="nv">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">3</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="o">(</span><span class="mi">4</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="mi">5</span><span class="o">)</span> <span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Label</span><span class="o">(</span><span class="n">Text</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">sprintf</span><span class="w"> </span><span class="s">&quot;x = %d&quot;</span><span class="w"> </span><span class="n">x</span><span class="o">)</span> <span class="c1">//Añade la etiqueta al formulario</span> <span class="n">form</span><span class="o">.</span><span class="n">Controls</span><span class="o">.</span><span class="n">Add</span><span class="o">(</span><span class="n">label</span><span class="o">)</span> <span class="c1">// Finalmente, corre el formulario </span> <span class="o">[&lt;</span><span class="nn">System</span><span class="p">.</span><span class="n">STAThread</span><span class="o">&gt;]</span> <span class="nn">Application</span><span class="p">.</span><span class="n">Run</span><span class="o">(</span><span class="n">form</span><span class="o">)</span> </pre></div> <p>Ejemplo de programación paralela asíncrona: </p> <div class="mw-highlight mw-highlight-lang-fsharp mw-content-ltr" dir="ltr"><pre><span></span><span class="sd">/// Detectando números primos</span> <span class="k">let</span><span class="w"> </span><span class="nv">isPrime</span><span class="w"> </span><span class="o">(</span><span class="n">n</span><span class="o">:</span><span class="n">int</span><span class="o">)</span><span class="w"> </span><span class="o">=</span> <span class="w"> </span><span class="k">let</span><span class="w"> </span><span class="nv">bound</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">int</span><span class="w"> </span><span class="o">(</span><span class="n">sqrt</span><span class="w"> </span><span class="o">(</span><span class="kt">float</span><span class="w"> </span><span class="n">n</span><span class="o">))</span> <span class="w"> </span><span class="n">seq</span><span class="w"> </span><span class="o">{</span><span class="mi">2</span><span class="w"> </span><span class="o">..</span><span class="w"> </span><span class="n">bound</span><span class="o">}</span><span class="w"> </span><span class="o">|&gt;</span><span class="w"> </span><span class="nn">Seq</span><span class="p">.</span><span class="n">forall</span><span class="w"> </span><span class="o">(</span><span class="k">fun</span><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="n">n</span><span class="w"> </span><span class="o">%</span><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="o">&lt;&gt;</span><span class="w"> </span><span class="mi">0</span><span class="o">)</span><span class="w"> </span> <span class="c1">// Usando async workflows </span> <span class="k">let</span><span class="w"> </span><span class="nv">primeAsync</span><span class="w"> </span><span class="n">n</span><span class="w"> </span><span class="o">=</span> <span class="w"> </span><span class="n">async</span><span class="w"> </span><span class="o">{</span><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="o">(</span><span class="n">n</span><span class="o">,</span><span class="w"> </span><span class="n">isPrime</span><span class="w"> </span><span class="n">n</span><span class="o">)</span><span class="w"> </span><span class="o">}</span> <span class="sd">/// Retornando primos entre m y n usando hilos</span> <span class="k">let</span><span class="w"> </span><span class="nv">primes</span><span class="w"> </span><span class="n">m</span><span class="w"> </span><span class="n">n</span><span class="w"> </span><span class="o">=</span> <span class="w"> </span><span class="n">seq</span><span class="w"> </span><span class="o">{</span><span class="n">m</span><span class="w"> </span><span class="o">..</span><span class="w"> </span><span class="n">n</span><span class="o">}</span> <span class="w"> </span><span class="o">|&gt;</span><span class="w"> </span><span class="nn">Seq</span><span class="p">.</span><span class="n">map</span><span class="w"> </span><span class="n">primeAsync</span> <span class="w"> </span><span class="o">|&gt;</span><span class="w"> </span><span class="nn">Async</span><span class="p">.</span><span class="n">Parallel</span> <span class="w"> </span><span class="o">|&gt;</span><span class="w"> </span><span class="nn">Async</span><span class="p">.</span><span class="n">RunSynchronously</span> <span class="w"> </span><span class="o">|&gt;</span><span class="w"> </span><span class="nn">Array</span><span class="p">.</span><span class="n">filter</span><span class="w"> </span><span class="n">snd</span> <span class="w"> </span><span class="o">|&gt;</span><span class="w"> </span><span class="nn">Array</span><span class="p">.</span><span class="n">map</span><span class="w"> </span><span class="n">fst</span> <span class="c1">// Corriendo una prueba </span> <span class="n">primes</span><span class="w"> </span><span class="mi">1000000</span><span class="w"> </span><span class="mi">1002000</span> <span class="w"> </span><span class="o">|&gt;</span><span class="w"> </span><span class="nn">Array</span><span class="p">.</span><span class="n">iter</span><span class="w"> </span><span class="o">(</span><span class="n">printfn</span><span class="w"> </span><span class="s">&quot;%d&quot;</span><span class="o">)</span> </pre></div> <div class="mw-heading mw-heading2"><h2 id="Véase_también"><span id="V.C3.A9ase_tambi.C3.A9n"></span>Véase también</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=F_Sharp&amp;action=edit&amp;section=16" title="Editar sección: Véase también"><span>editar</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a href="/wiki/C_Sharp" title="C Sharp">C#</a></li> <li><a href="/wiki/Clojure" title="Clojure">Clojure</a></li> <li><a href="/wiki/Haskell" title="Haskell">Haskell</a></li> <li><a href="/wiki/Mono_(software)" class="mw-redirect" title="Mono (software)">Mono</a></li> <li><a href="/wiki/ML_(lenguaje_de_programaci%C3%B3n)" title="ML (lenguaje de programación)">ML</a></li> <li><a href="/wiki/.NET_Framework" class="mw-redirect" title=".NET Framework">.NET Framework</a></li> <li><a href="/w/index.php?title=OCaml&amp;action=edit&amp;redlink=1" class="new" title="OCaml (aún no redactado)">OCaml</a></li> <li><a href="/wiki/Python" title="Python">Python</a></li> <li><a href="/wiki/Scala_(lenguaje_de_programaci%C3%B3n)" title="Scala (lenguaje de programación)">Scala</a></li></ul> <div class="mw-heading mw-heading2"><h2 id="Notas">Notas</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=F_Sharp&amp;action=edit&amp;section=17" title="Editar sección: Notas"><span>editar</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="listaref" style="list-style-type: decimal;"><ol class="references"> <li id="cite_note-1"><span class="mw-cite-backlink"><a href="#cite_ref-1">↑</a></span> <span class="reference-text"><span id="CITAREFdsyme" class="citation web">dsyme. <a rel="nofollow" class="external text" href="http://blogs.msdn.com/b/fsharpteam/archive/2012/09/24/announcing-the-f-3-0-open-source-code-drop.aspx">«Announcing the F# 3.0 Open Source Code Drop»</a><span class="reference-accessdate">. Consultado el 24 de septiembre de 2012</span>.</span><span title="ctx_ver=Z39.88-2004&amp;rfr_id=info%3Asid%2Fes.wikipedia.org%3AF+Sharp&amp;rft.au=dsyme&amp;rft.aulast=dsyme&amp;rft.btitle=Announcing+the+F%23+3.0+Open+Source+Code+Drop&amp;rft.genre=book&amp;rft_id=http%3A%2F%2Fblogs.msdn.com%2Fb%2Ffsharpteam%2Farchive%2F2012%2F09%2F24%2Fannouncing-the-f-3-0-open-source-code-drop.aspx&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook" class="Z3988"><span style="display:none;">&#160;</span></span></span> </li> <li id="cite_note-2"><span class="mw-cite-backlink"><a href="#cite_ref-2">↑</a></span> <span class="reference-text"><span id="CITAREFS._Somasegar" class="citation web">S. Somasegar. <a rel="nofollow" class="external text" href="http://blogs.msdn.com/somasegar/archive/2007/10/17/f-a-functional-programming-language.aspx">«F# - A functional Programming Language»</a><span class="reference-accessdate">. Consultado el 18 de octubre de 2007</span>.</span><span title="ctx_ver=Z39.88-2004&amp;rfr_id=info%3Asid%2Fes.wikipedia.org%3AF+Sharp&amp;rft.au=S.+Somasegar&amp;rft.aulast=S.+Somasegar&amp;rft.btitle=F%23+-+A+functional%0AProgramming+Language&amp;rft.genre=book&amp;rft_id=http%3A%2F%2Fblogs.msdn.com%2Fsomasegar%2Farchive%2F2007%2F10%2F17%2Ff-a-functional-programming-language.aspx&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook" class="Z3988"><span style="display:none;">&#160;</span></span></span> </li> <li id="cite_note-seq-3"><span class="mw-cite-backlink">↑ <a href="#cite_ref-seq_3-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-seq_3-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><span class="citation web"><a rel="nofollow" class="external text" href="http://blogs.msdn.com/dsyme/archive/2007/09/22/some-details-on-f-computation-expressions-aka-monadic-or-workflow-syntax.aspx">«Some Details on F# Computation Expressions»</a><span class="reference-accessdate">. Consultado el 14 de diciembre de 2007</span>.</span><span title="ctx_ver=Z39.88-2004&amp;rfr_id=info%3Asid%2Fes.wikipedia.org%3AF+Sharp&amp;rft.btitle=Some+Details+on+F%23+Computation+Expressions&amp;rft.genre=book&amp;rft_id=http%3A%2F%2Fblogs.msdn.com%2Fdsyme%2Farchive%2F2007%2F09%2F22%2Fsome-details-on-f-computation-expressions-aka-monadic-or-workflow-syntax.aspx&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook" class="Z3988"><span style="display:none;">&#160;</span></span></span> </li> <li id="cite_note-activePatterns-4"><span class="mw-cite-backlink">↑ <a href="#cite_ref-activePatterns_4-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-activePatterns_4-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><span class="citation web"><a rel="nofollow" class="external text" href="http://www.developerfusion.com/article/133772/pattern-matching-in-f-part-2-active-patterns/">«Pattern Matching in F# Part 2&#160;: Active Patterns»</a><span class="reference-accessdate">. Consultado el 24 de noviembre de 2012</span>.</span><span title="ctx_ver=Z39.88-2004&amp;rfr_id=info%3Asid%2Fes.wikipedia.org%3AF+Sharp&amp;rft.btitle=Pattern+Matching+in+F%23+%0A%0APart+2+%3A+Active+Patterns&amp;rft.genre=book&amp;rft_id=http%3A%2F%2Fwww.developerfusion.com%2Farticle%2F133772%2Fpattern-matching-in-f-part-2-active-patterns%2F&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook" class="Z3988"><span style="display:none;">&#160;</span></span></span> </li> <li id="cite_note-aw-5"><span class="mw-cite-backlink">↑ <a href="#cite_ref-aw_5-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-aw_5-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-aw_5-2"><sup><i><b>c</b></i></sup></a></span> <span class="reference-text"><span class="citation web"><a rel="nofollow" class="external text" href="http://blogs.msdn.com/dsyme/archive/2007/10/11/introducing-f-asynchronous-workflows.aspx">«Introducing F# Asynchronous Workflows»</a><span class="reference-accessdate">. Consultado el 14 de diciembre de 2007</span>.</span><span title="ctx_ver=Z39.88-2004&amp;rfr_id=info%3Asid%2Fes.wikipedia.org%3AF+Sharp&amp;rft.btitle=Introducing+F%23+Asynchronous+Workflows&amp;rft.genre=book&amp;rft_id=http%3A%2F%2Fblogs.msdn.com%2Fdsyme%2Farchive%2F2007%2F10%2F11%2Fintroducing-f-asynchronous-workflows.aspx&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook" class="Z3988"><span style="display:none;">&#160;</span></span></span> </li> <li id="cite_note-quotations-6"><span class="mw-cite-backlink"><a href="#cite_ref-quotations_6-0">↑</a></span> <span class="reference-text"><span class="citation web"><a rel="nofollow" class="external text" href="http://msdn.microsoft.com/en-us/library/dd233212.aspx">«Code Quotations (F#)»</a><span class="reference-accessdate">. Consultado el 24 de noviembre de 2012</span>.</span><span title="ctx_ver=Z39.88-2004&amp;rfr_id=info%3Asid%2Fes.wikipedia.org%3AF+Sharp&amp;rft.btitle=Code+Quotations+%28F%23%29&amp;rft.genre=book&amp;rft_id=http%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Fdd233212.aspx&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook" class="Z3988"><span style="display:none;">&#160;</span></span></span> </li> <li id="cite_note-typeproviders-7"><span class="mw-cite-backlink"><a href="#cite_ref-typeproviders_7-0">↑</a></span> <span class="reference-text"><span class="citation web"><a rel="nofollow" class="external text" href="http://msdn.microsoft.com/en-us/library/hh156509.aspx">«Type Providers»</a><span class="reference-accessdate">. Consultado el 24 de noviembre de 2012</span>.</span><span title="ctx_ver=Z39.88-2004&amp;rfr_id=info%3Asid%2Fes.wikipedia.org%3AF+Sharp&amp;rft.btitle=Type+Providers&amp;rft.genre=book&amp;rft_id=http%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Fhh156509.aspx&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook" class="Z3988"><span style="display:none;">&#160;</span></span></span> </li> <li id="cite_note-8"><span class="mw-cite-backlink"><a href="#cite_ref-8">↑</a></span> <span class="reference-text"><span class="citation web"><a rel="nofollow" class="external text" href="http://blogs.msdn.com/b/dsyme/archive/2012/09/21/new-tech-report-from-microsoft-research-strongly-typed-language-support-for-internet-scale-information-sources.aspx">«New Tech Report from Microsoft Research: Strongly-Typed Language Support for Internet-Scale Information Sources»</a><span class="reference-accessdate">. Consultado el 24 de noviembre de 2012</span>.</span><span title="ctx_ver=Z39.88-2004&amp;rfr_id=info%3Asid%2Fes.wikipedia.org%3AF+Sharp&amp;rft.btitle=New+Tech+Report+from+Microsoft+Research%3A+Strongly-Typed+Language+Support+for+Internet-Scale+Information+Sources&amp;rft.genre=book&amp;rft_id=http%3A%2F%2Fblogs.msdn.com%2Fb%2Fdsyme%2Farchive%2F2012%2F09%2F21%2Fnew-tech-report-from-microsoft-research-strongly-typed-language-support-for-internet-scale-information-sources.aspx&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook" class="Z3988"><span style="display:none;">&#160;</span></span></span> </li> <li id="cite_note-queries-9"><span class="mw-cite-backlink"><a href="#cite_ref-queries_9-0">↑</a></span> <span class="reference-text"><span class="citation web"><a rel="nofollow" class="external text" href="http://msdn.microsoft.com/en-us/library/vstudio/hh225374.aspx">«Query Expressions (F#)»</a><span class="reference-accessdate">. Consultado el 24 de noviembre de 2012</span>.</span><span title="ctx_ver=Z39.88-2004&amp;rfr_id=info%3Asid%2Fes.wikipedia.org%3AF+Sharp&amp;rft.btitle=Query+Expressions+%28F%23%29&amp;rft.genre=book&amp;rft_id=http%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Fvstudio%2Fhh225374.aspx&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook" class="Z3988"><span style="display:none;">&#160;</span></span></span> </li> <li id="cite_note-irp-10"><span class="mw-cite-backlink"><a href="#cite_ref-irp_10-0">↑</a></span> <span class="reference-text"><span class="citation web"><a rel="nofollow" class="external text" href="http://www.infoq.com/news/2011/09/Fsharp-3.0">«F# 3.0 – LINQ + Type Providers = Information Rich Programming»</a><span class="reference-accessdate">. Consultado el 24 de noviembre de 2012</span>.</span><span title="ctx_ver=Z39.88-2004&amp;rfr_id=info%3Asid%2Fes.wikipedia.org%3AF+Sharp&amp;rft.btitle=F%23+3.0+%E2%80%93+LINQ+%2B+Type%0AProviders+%3D+Information+Rich+Programming&amp;rft.genre=book&amp;rft_id=http%3A%2F%2Fwww.infoq.com%2Fnews%2F2011%2F09%2FFsharp-3.0&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook" class="Z3988"><span style="display:none;">&#160;</span></span></span> </li> <li id="cite_note-webstacks-11"><span class="mw-cite-backlink"><a href="#cite_ref-webstacks_11-0">↑</a></span> <span class="reference-text"><span class="citation web"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20130503040304/http://fsharp.org/webstacks/">«Web Stacks for F#»</a>. Archivado desde <a rel="nofollow" class="external text" href="http://fsharp.org/webstacks/">el original</a> el 3 de mayo de 2013<span class="reference-accessdate">. Consultado el 24 de noviembre de 2012</span>.</span><span title="ctx_ver=Z39.88-2004&amp;rfr_id=info%3Asid%2Fes.wikipedia.org%3AF+Sharp&amp;rft.btitle=Web+Stacks+for+F%23&amp;rft.genre=book&amp;rft_id=http%3A%2F%2Ffsharp.org%2Fwebstacks%2F&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook" class="Z3988"><span style="display:none;">&#160;</span></span></span> </li> <li id="cite_note-12"><span class="mw-cite-backlink"><a href="#cite_ref-12">↑</a></span> <span class="reference-text"><span class="citation web"><a rel="nofollow" class="external text" href="http://blogs.msdn.com/b/chrsmith/archive/2008/09/12/scripting-in-f.aspx">«Scripting in F#»</a><span class="reference-accessdate">. Consultado el 25 de noviembre de 2012</span>.</span><span title="ctx_ver=Z39.88-2004&amp;rfr_id=info%3Asid%2Fes.wikipedia.org%3AF+Sharp&amp;rft.btitle=Scripting+in+F%23&amp;rft.genre=book&amp;rft_id=http%3A%2F%2Fblogs.msdn.com%2Fb%2Fchrsmith%2Farchive%2F2008%2F09%2F12%2Fscripting-in-f.aspx&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook" class="Z3988"><span style="display:none;">&#160;</span></span></span> </li> </ol></div> <div class="mw-heading mw-heading2"><h2 id="Referencias">Referencias</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=F_Sharp&amp;action=edit&amp;section=18" title="Editar sección: Referencias"><span>editar</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><span id="CITAREFSymeGraniczCisternino2007" class="citation publicación"><a href="/w/index.php?title=Don_Syme&amp;action=edit&amp;redlink=1" class="new" title="Don Syme (aún no redactado)">Syme, Don</a>; Granicz, Adam; Cisternino, Antonio (2007). <i>Expert F#</i>. <a href="/w/index.php?title=Apress&amp;action=edit&amp;redlink=1" class="new" title="Apress (aún no redactado)">Apress</a>.</span><span title="ctx_ver=Z39.88-2004&amp;rfr_id=info%3Asid%2Fes.wikipedia.org%3AF+Sharp&amp;rft.au=Cisternino%2C+Antonio&amp;rft.au=Granicz%2C+Adam&amp;rft.au=Syme%2C+Don&amp;rft.aufirst=Don&amp;rft.aulast=Syme&amp;rft.btitle=Expert+F%23&amp;rft.date=2007&amp;rft.genre=book&amp;rft.pub=Apress&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook" class="Z3988"><span style="display:none;">&#160;</span></span></li> <li><span id="CITAREFHarrop2010" class="citation publicación">Harrop, Jon (2010). <i>Visual F# 2010 for Technical Computing</i>. Flying Frog Consultancy.</span><span title="ctx_ver=Z39.88-2004&amp;rfr_id=info%3Asid%2Fes.wikipedia.org%3AF+Sharp&amp;rft.au=Harrop%2C+Jon&amp;rft.aufirst=Jon&amp;rft.aulast=Harrop&amp;rft.btitle=Visual+F%23+2010+for+Technical+Computing&amp;rft.date=2010&amp;rft.genre=book&amp;rft.pub=Flying+Frog+Consultancy&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook" class="Z3988"><span style="display:none;">&#160;</span></span></li> <li><span id="CITAREFPickering2007" class="citation publicación">Pickering, Robert (2007). <i>Foundations of F#</i>. <a href="/w/index.php?title=Apress&amp;action=edit&amp;redlink=1" class="new" title="Apress (aún no redactado)">Apress</a>.</span><span title="ctx_ver=Z39.88-2004&amp;rfr_id=info%3Asid%2Fes.wikipedia.org%3AF+Sharp&amp;rft.au=Pickering%2C+Robert&amp;rft.aufirst=Robert&amp;rft.aulast=Pickering&amp;rft.btitle=Foundations+of+F%23&amp;rft.date=2007&amp;rft.genre=book&amp;rft.pub=Apress&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook" class="Z3988"><span style="display:none;">&#160;</span></span></li> <li><span id="CITAREFSmith2009" class="citation publicación">Smith, Chris (2009). <i>Programming F#</i>. <a href="/wiki/O%27Reilly_Media" title="O&#39;Reilly Media">O'Reilly</a>.</span><span title="ctx_ver=Z39.88-2004&amp;rfr_id=info%3Asid%2Fes.wikipedia.org%3AF+Sharp&amp;rft.au=Smith%2C+Chris&amp;rft.aufirst=Chris&amp;rft.aulast=Smith&amp;rft.btitle=Programming+F%23&amp;rft.date=2009&amp;rft.genre=book&amp;rft.pub=O%27Reilly&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook" class="Z3988"><span style="display:none;">&#160;</span></span></li> <li><span id="CITAREFPetricek2009" class="citation publicación">Petricek, Tomas (2009). <i>Real World Functional Programming With Examples in F# and C#</i>. Manning Publications.</span><span title="ctx_ver=Z39.88-2004&amp;rfr_id=info%3Asid%2Fes.wikipedia.org%3AF+Sharp&amp;rft.au=Petricek%2C+Tomas&amp;rft.aufirst=Tomas&amp;rft.aulast=Petricek&amp;rft.btitle=Real+World+Functional+Programming+With+Examples+in+F%23+and+C%23&amp;rft.date=2009&amp;rft.genre=book&amp;rft.pub=Manning+Publications&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook" class="Z3988"><span style="display:none;">&#160;</span></span></li> <li><a rel="nofollow" class="external text" href="https://www.visualstudio.com/es/vs/whatsnew/">Microsoft inc. (2017). https://www.visualstudio.com/es/vs/whatsnew/</a></li> <li><a rel="nofollow" class="external text" href="https://web.archive.org/web/20170312195940/https://line.do/es/lenguajes-de-programacion/m9e/vertical">Lenguajes de programación (2015). https://web.archive.org/web/20170312195940/https://line.do/es/lenguajes-de-programacion/m9e/vertical</a></li></ul> <div class="mw-heading mw-heading2"><h2 id="Enlaces_externos">Enlaces externos</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=F_Sharp&amp;action=edit&amp;section=19" title="Editar sección: Enlaces externos"><span>editar</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a rel="nofollow" class="external text" href="http://fsharp.org">The F# Software Foundation</a></li> <li><a rel="nofollow" class="external text" href="http://fsharp.github.io">The F# Open Source Group at GitHub</a></li> <li><a rel="nofollow" class="external text" href="http://fsharp.net">The Visual F# Developer Center</a> <a rel="nofollow" class="external text" href="https://web.archive.org/web/20081119161341/http://fsharp.net/">Archivado</a> el 19 de noviembre de 2008 en <a href="/wiki/Wayback_Machine" title="Wayback Machine">Wayback Machine</a>.</li> <li><a rel="nofollow" class="external text" href="https://web.archive.org/web/20121130163443/http://www.tryfsharp.org/">Try F#, for learning F# in your browser</a></li> <li><a rel="nofollow" class="external text" href="http://fssnip.net">F# Snippets Site</a></li> <li><a rel="nofollow" class="external text" href="http://blogs.msdn.com/fsharpteam">The Visual F# team blog</a></li> <li><a rel="nofollow" class="external text" href="http://research.microsoft.com/fsharp">The original Microsoft Research website for F#</a></li> <li><a rel="nofollow" class="external text" href="http://feedproxy.google.com/planet_fsharp">Planet F#</a> <a rel="nofollow" class="external text" href="https://web.archive.org/web/20090213202656/http://feedproxy.google.com/planet_fsharp">Archivado</a> el 13 de febrero de 2009 en <a href="/wiki/Wayback_Machine" title="Wayback Machine">Wayback Machine</a>.</li> <li><a rel="nofollow" class="external text" href="https://web.archive.org/web/20110715231625/http://www.ctocorner.com/fsharp/book/default.aspx">The F# Survival Guide, Dec 2009 (Web-based book)</a></li> <li><a rel="nofollow" class="external text" href="http://research.microsoft.com/en-us/um/cambridge/projects/fsharp/manual/spec.html">The F# 3.0 Language Specification</a></li> <li><a rel="nofollow" class="external text" href="http://www.developerfusion.com/article/122079/intro-to-f/">An introduction to F# programming</a></li></ul> <style data-mw-deduplicate="TemplateStyles:r161257576">.mw-parser-output .mw-authority-control{margin-top:1.5em}.mw-parser-output .mw-authority-control .navbox table{margin:0}.mw-parser-output .mw-authority-control .navbox hr:last-child{display:none}.mw-parser-output .mw-authority-control .navbox+.mw-mf-linked-projects{display:none}.mw-parser-output .mw-authority-control .mw-mf-linked-projects{display:flex;padding:0.5em;border:1px solid var(--border-color-base,#a2a9b1);background-color:var(--background-color-neutral,#eaecf0);color:var(--color-base,#202122)}.mw-parser-output .mw-authority-control .mw-mf-linked-projects ul li{margin-bottom:0}.mw-parser-output .mw-authority-control .navbox{border:1px solid var(--border-color-base,#a2a9b1);background-color:var(--background-color-neutral-subtle,#f8f9fa)}.mw-parser-output .mw-authority-control .navbox-list{border-color:#f8f9fa}.mw-parser-output .mw-authority-control .navbox th{background-color:#eeeeff}html.skin-theme-clientpref-night .mw-parser-output .mw-authority-control .mw-mf-linked-projects{border:1px solid var(--border-color-base,#72777d);background-color:var(--background-color-neutral,#27292d);color:var(--color-base,#eaecf0)}html.skin-theme-clientpref-night .mw-parser-output .mw-authority-control .navbox{border:1px solid var(--border-color-base,#72777d)!important;background-color:var(--background-color-neutral-subtle,#202122)!important}html.skin-theme-clientpref-night .mw-parser-output .mw-authority-control .navbox-list{border-color:#202122!important}html.skin-theme-clientpref-night .mw-parser-output .mw-authority-control .navbox th{background-color:#27292d!important}@media(prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .mw-authority-control .mw-mf-linked-projects{border:1px solid var(--border-color-base,#72777d)!important;background-color:var(--background-color-neutral,#27292d)!important;color:var(--color-base,#eaecf0)!important}html.skin-theme-clientpref-os .mw-parser-output .mw-authority-control .navbox{border:1px solid var(--border-color-base,#72777d)!important;background-color:var(--background-color-neutral-subtle,#202122)!important}html.skin-theme-clientpref-os .mw-parser-output .mw-authority-control .navbox-list{border-color:#202122!important}html.skin-theme-clientpref-os .mw-parser-output .mw-authority-control .navbox th{background-color:#27292d!important}}</style><div class="mw-authority-control"><div role="navigation" class="navbox" aria-label="Navbox" style="width: inherit;padding:3px"><table class="hlist navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="row" class="navbox-group" style="width: 12%; text-align:center;"><a href="/wiki/Control_de_autoridades" title="Control de autoridades">Control de autoridades</a></th><td class="navbox-list navbox-odd" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px"><div style="padding:0em 0.25em"> <ul><li><b>Proyectos Wikimedia</b></li> <li><span style="white-space:nowrap;"><span typeof="mw:File"><a href="/wiki/Wikidata" title="Wikidata"><img alt="Wd" src="//upload.wikimedia.org/wikipedia/commons/thumb/f/ff/Wikidata-logo.svg/20px-Wikidata-logo.svg.png" decoding="async" width="20" height="11" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/f/ff/Wikidata-logo.svg/30px-Wikidata-logo.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/f/ff/Wikidata-logo.svg/40px-Wikidata-logo.svg.png 2x" data-file-width="1050" data-file-height="590" /></a></span> Datos:</span> <span class="uid"><a href="https://www.wikidata.org/wiki/Q648619" class="extiw" title="wikidata:Q648619">Q648619</a></span></li> <li><span style="white-space:nowrap;"><span typeof="mw:File"><a href="/wiki/Wikimedia_Commons" title="Commonscat"><img alt="Commonscat" src="//upload.wikimedia.org/wikipedia/commons/thumb/4/4a/Commons-logo.svg/15px-Commons-logo.svg.png" decoding="async" width="15" height="20" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/4/4a/Commons-logo.svg/23px-Commons-logo.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/4/4a/Commons-logo.svg/30px-Commons-logo.svg.png 2x" data-file-width="1024" data-file-height="1376" /></a></span> Multimedia:</span> <span class="uid"><span class="plainlinks"><a class="external text" href="https://commons.wikimedia.org/wiki/Category:F_Sharp_(programming_language)">F Sharp (programming language)</a></span> / <span class="plainlinks"><a class="external text" href="https://commons.wikimedia.org/wiki/Special:MediaSearch?type=image&amp;search=%22Q648619%22">Q648619</a></span></span></li></ul> <hr /> </div></td></tr></tbody></table></div><div class="mw-mf-linked-projects hlist"> <ul><li><span style="white-space:nowrap;"><span typeof="mw:File"><a href="/wiki/Wikidata" title="Wikidata"><img alt="Wd" src="//upload.wikimedia.org/wikipedia/commons/thumb/f/ff/Wikidata-logo.svg/20px-Wikidata-logo.svg.png" decoding="async" width="20" height="11" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/f/ff/Wikidata-logo.svg/30px-Wikidata-logo.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/f/ff/Wikidata-logo.svg/40px-Wikidata-logo.svg.png 2x" data-file-width="1050" data-file-height="590" /></a></span> Datos:</span> <span class="uid"><a href="https://www.wikidata.org/wiki/Q648619" class="extiw" title="wikidata:Q648619">Q648619</a></span></li> <li><span style="white-space:nowrap;"><span typeof="mw:File"><a href="/wiki/Wikimedia_Commons" title="Commonscat"><img alt="Commonscat" src="//upload.wikimedia.org/wikipedia/commons/thumb/4/4a/Commons-logo.svg/15px-Commons-logo.svg.png" decoding="async" width="15" height="20" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/4/4a/Commons-logo.svg/23px-Commons-logo.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/4/4a/Commons-logo.svg/30px-Commons-logo.svg.png 2x" data-file-width="1024" data-file-height="1376" /></a></span> Multimedia:</span> <span class="uid"><span class="plainlinks"><a class="external text" href="https://commons.wikimedia.org/wiki/Category:F_Sharp_(programming_language)">F Sharp (programming language)</a></span> / <span class="plainlinks"><a class="external text" href="https://commons.wikimedia.org/wiki/Special:MediaSearch?type=image&amp;search=%22Q648619%22">Q648619</a></span></span></li></ul> </div></div> <!-- NewPP limit report Parsed by mw‐web.eqiad.main‐67876799fc‐f4djw Cached time: 20241127152149 Cache expiry: 2592000 Reduced expiry: false Complications: [show‐toc] CPU time usage: 0.275 seconds Real time usage: 1.482 seconds Preprocessor visited node count: 923/1000000 Post‐expand include size: 25186/2097152 bytes Template argument size: 145/2097152 bytes Highest expansion depth: 6/100 Expensive parser function count: 16/500 Unstrip recursion depth: 0/20 Unstrip post‐expand size: 45050/5000000 bytes Lua time usage: 0.131/10.000 seconds Lua memory usage: 2200239/52428800 bytes Number of Wikibase entities loaded: 2/400 --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 1311.493 1 -total 17.78% 233.232 1 Plantilla:Control_de_autoridades 5.09% 66.728 1 Plantilla:Listaref 4.18% 54.781 12 Plantilla:Cita_web 0.93% 12.148 5 Plantilla:Cite_document 0.27% 3.487 2 Plantilla:Wayback 0.20% 2.633 1 Plantilla:Título_erróneo --> <!-- Saved in parser cache with key eswiki:pcache:1868680:|#|:idhash:canonical and timestamp 20241127152149 and revision id 162311759. Rendering was triggered because: page-view --> </div><!--esi <esi:include src="/esitest-fa8a495983347898/content" /> --><noscript><img src="https://login.wikimedia.org/wiki/Special:CentralAutoLogin/start?type=1x1" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">Obtenido de «<a dir="ltr" href="https://es.wikipedia.org/w/index.php?title=F_Sharp&amp;oldid=162311759">https://es.wikipedia.org/w/index.php?title=F_Sharp&amp;oldid=162311759</a>»</div></div> <div id="catlinks" class="catlinks" data-mw="interface"><div id="mw-normal-catlinks" class="mw-normal-catlinks"><a href="/wiki/Especial:Categor%C3%ADas" title="Especial:Categorías">Categorías</a>: <ul><li><a href="/wiki/Categor%C3%ADa:Wikipedia:T%C3%ADtulo_err%C3%B3neo" title="Categoría:Wikipedia:Título erróneo">Wikipedia:Título erróneo</a></li><li><a href="/wiki/Categor%C3%ADa:Plataforma_.NET" title="Categoría:Plataforma .NET">Plataforma .NET</a></li><li><a href="/wiki/Categor%C3%ADa:Lenguajes_de_programaci%C3%B3n_multiparadigma" title="Categoría:Lenguajes de programación multiparadigma">Lenguajes de programación multiparadigma</a></li><li><a href="/wiki/Categor%C3%ADa:C%C3%B3digo_abierto" title="Categoría:Código abierto">Código abierto</a></li><li><a href="/wiki/Categor%C3%ADa:Software_que_utiliza_la_licencia_Apache" title="Categoría:Software que utiliza la licencia Apache">Software que utiliza la licencia Apache</a></li></ul></div></div> </div> </main> </div> <div class="mw-footer-container"> <footer id="footer" class="mw-footer" > <ul id="footer-info"> <li id="footer-info-lastmod"> Esta página se editó por última vez el 7 sep 2024 a las 02:37.</li> <li id="footer-info-copyright">El texto está disponible bajo la <a href="/wiki/Wikipedia:Texto_de_la_Licencia_Creative_Commons_Atribuci%C3%B3n-CompartirIgual_4.0_Internacional" title="Wikipedia:Texto de la Licencia Creative Commons Atribución-CompartirIgual 4.0 Internacional">Licencia Creative Commons Atribución-CompartirIgual 4.0</a>; pueden aplicarse cláusulas adicionales. Al usar este sitio aceptas nuestros <a class="external text" href="https://foundation.wikimedia.org/wiki/Policy:Terms_of_Use/es">términos de uso</a> y nuestra <a class="external text" href="https://foundation.wikimedia.org/wiki/Policy:Privacy_policy/es">política de privacidad</a>.<br />Wikipedia&#174; es una marca registrada de la <a rel="nofollow" class="external text" href="https://wikimediafoundation.org/es/">Fundación Wikimedia</a>, una organización sin ánimo de lucro.</li> </ul> <ul id="footer-places"> <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy/es">Política de privacidad</a></li> <li id="footer-places-about"><a href="/wiki/Wikipedia:Acerca_de">Acerca de Wikipedia</a></li> <li id="footer-places-disclaimers"><a href="/wiki/Wikipedia:Limitaci%C3%B3n_general_de_responsabilidad">Limitación de responsabilidad</a></li> <li id="footer-places-wm-codeofconduct"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Universal_Code_of_Conduct">Código de conducta</a></li> <li id="footer-places-developers"><a href="https://developer.wikimedia.org">Desarrolladores</a></li> <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/#/es.wikipedia.org">Estadísticas</a></li> <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement/es">Declaración de cookies</a></li> <li id="footer-places-mobileview"><a href="//es.m.wikipedia.org/w/index.php?title=F_Sharp&amp;mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">Versión para móviles</a></li> </ul> <ul id="footer-icons" class="noprint"> <li id="footer-copyrightico"><a href="https://wikimediafoundation.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/static/images/footer/wikimedia-button.svg" width="84" height="29" alt="Wikimedia Foundation" loading="lazy"></a></li> <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/w/resources/assets/poweredby_mediawiki.svg" alt="Powered by MediaWiki" width="88" height="31" loading="lazy"></a></li> </ul> </footer> </div> </div> </div> <div class="vector-settings" id="p-dock-bottom"> <ul></ul> </div><script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgHostname":"mw-web.codfw.main-74cc59cb9d-zqv87","wgBackendResponseTime":172,"wgPageParseReport":{"limitreport":{"cputime":"0.275","walltime":"1.482","ppvisitednodes":{"value":923,"limit":1000000},"postexpandincludesize":{"value":25186,"limit":2097152},"templateargumentsize":{"value":145,"limit":2097152},"expansiondepth":{"value":6,"limit":100},"expensivefunctioncount":{"value":16,"limit":500},"unstrip-depth":{"value":0,"limit":20},"unstrip-size":{"value":45050,"limit":5000000},"entityaccesscount":{"value":2,"limit":400},"timingprofile":["100.00% 1311.493 1 -total"," 17.78% 233.232 1 Plantilla:Control_de_autoridades"," 5.09% 66.728 1 Plantilla:Listaref"," 4.18% 54.781 12 Plantilla:Cita_web"," 0.93% 12.148 5 Plantilla:Cite_document"," 0.27% 3.487 2 Plantilla:Wayback"," 0.20% 2.633 1 Plantilla:Título_erróneo"]},"scribunto":{"limitreport-timeusage":{"value":"0.131","limit":"10.000"},"limitreport-memusage":{"value":2200239,"limit":52428800}},"cachereport":{"origin":"mw-web.eqiad.main-67876799fc-f4djw","timestamp":"20241127152149","ttl":2592000,"transientcontent":false}}});});</script> <script type="application/ld+json">{"@context":"https:\/\/schema.org","@type":"Article","name":"F Sharp","url":"https:\/\/es.wikipedia.org\/wiki\/F_Sharp","sameAs":"http:\/\/www.wikidata.org\/entity\/Q648619","mainEntity":"http:\/\/www.wikidata.org\/entity\/Q648619","author":{"@type":"Organization","name":"Colaboradores de los proyectos Wikimedia"},"publisher":{"@type":"Organization","name":"Wikimedia Foundation, Inc.","logo":{"@type":"ImageObject","url":"https:\/\/www.wikimedia.org\/static\/images\/wmf-hor-googpub.png"}},"datePublished":"2008-09-01T23:13:51Z","dateModified":"2024-09-07T02:37:01Z","image":"https:\/\/upload.wikimedia.org\/wikipedia\/commons\/9\/93\/FSharp_Logo.png","headline":"lenguaje de programaci\u00f3n"}</script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10