CINXE.COM

OCaml - Wikipedia

<!DOCTYPE html> <html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-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-sticky-header-enabled vector-toc-available" lang="en" dir="ltr"> <head> <meta charset="UTF-8"> <title>OCaml - Wikipedia</title> <script>(function(){var className="client-js vector-feature-language-in-header-enabled vector-feature-language-in-main-page-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-sticky-header-enabled vector-toc-available";var cookie=document.cookie.match(/(?:^|; )enwikimwclientpreferences=([^;]+)/);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":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy","wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgRequestId":"8f16564b-01d8-4cde-b680-0a12f19f43c6","wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"OCaml","wgTitle":"OCaml","wgCurRevisionId":1276758030,"wgRevisionId":1276758030,"wgArticleId":39652,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["CS1 errors: missing title","CS1 errors: bare URL","Articles with short description","Short description is different from Wikidata","Use dmy dates from November 2022","Articles needing additional references from January 2024","All articles needing additional references","Articles with example OCaml code","High-level programming languages","Cross-platform free software","Extensible syntax programming languages","Free and open source interpreters","Functional languages","Object-oriented programming languages","ML programming language family","OCaml programming language family","OCaml software","Pattern matching programming languages","Programming languages created in 1996","Statically typed programming languages","Software using the GNU Lesser General Public License"],"wgPageViewLanguage":"en","wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgRelevantPageName":"OCaml","wgRelevantArticleId":39652,"wgIsProbablyEditable":true,"wgRelevantPageIsProbablyEditable":true,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgNoticeProject":"wikipedia","wgCiteReferencePreviewsActive":false,"wgFlaggedRevsParams":{"tags":{"status":{"levels":1}}},"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":true,"wgPopupsFlags":0,"wgVisualEditor":{"pageLanguageCode":"en","pageLanguageDir":"ltr","pageVariantFallbacks":"en"},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":false,"nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":40000,"wgEditSubmitButtonLabelPublish":true,"wgULSPosition":"interlanguage","wgULSisCompactLinksEnabled":false,"wgVector2022LanguageInHeader":true,"wgULSisLanguageSelectorEmpty":false,"wgWikibaseItemId":"Q212587","wgCheckUserClientHintsHeadersJsApi":["brands","architecture","bitness","fullVersionList","mobile","model","platform","platformVersion"],"GEHomepageSuggestedEditsEnableTopics":true,"wgGETopicsMatchModeEnabled":false,"wgGEStructuredTaskRejectionReasonTextInputEnabled":false,"wgGELevelingUpEnabledForUser":false}; RLSTATE={"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","jquery.makeCollapsible.styles":"ready","ext.wikimediamessages.styles":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","ext.uls.interlanguage":"ready","wikibase.client.init":"ready"};RLPAGEMODULES=["ext.cite.ux-enhancements","ext.pygments.view","mediawiki.page.media","site","mediawiki.page.ready","jquery.makeCollapsible","mediawiki.toc","skins.vector.js","ext.centralNotice.geoIP","ext.centralNotice.startUp","ext.gadget.ReferenceTooltips","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"];</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=en&amp;modules=ext.cite.styles%7Cext.pygments%7Cext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediamessages.styles%7Cjquery.makeCollapsible.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=en&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=en&amp;modules=site.styles&amp;only=styles&amp;skin=vector-2022"> <meta name="generator" content="MediaWiki 1.44.0-wmf.20"> <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 name="viewport" content="width=1120"> <meta property="og:title" content="OCaml - Wikipedia"> <meta property="og:type" content="website"> <link rel="preconnect" href="//upload.wikimedia.org"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//en.m.wikipedia.org/wiki/OCaml"> <link rel="alternate" type="application/x-wiki" title="Edit this page" href="/w/index.php?title=OCaml&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 (en)"> <link rel="EditURI" type="application/rsd+xml" href="//en.wikipedia.org/w/api.php?action=rsd"> <link rel="canonical" href="https://en.wikipedia.org/wiki/OCaml"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en"> <link rel="alternate" type="application/atom+xml" title="Wikipedia Atom feed" href="/w/index.php?title=Special:RecentChanges&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-OCaml rootpage-OCaml skin-vector-2022 action-view"><a class="mw-jump-link" href="#bodyContent">Jump to content</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="Site"> <div id="vector-main-menu-dropdown" class="vector-dropdown vector-main-menu-dropdown vector-button-flush-left vector-button-flush-right" title="Main menu" > <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="Main menu" > <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">Main menu</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">Main menu</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-main-menu.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-main-menu.unpin">hide</button> </div> <div id="p-navigation" class="vector-menu mw-portlet mw-portlet-navigation" > <div class="vector-menu-heading"> Navigation </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-mainpage-description" class="mw-list-item"><a href="/wiki/Main_Page" title="Visit the main page [z]" accesskey="z"><span>Main page</span></a></li><li id="n-contents" class="mw-list-item"><a href="/wiki/Wikipedia:Contents" title="Guides to browsing Wikipedia"><span>Contents</span></a></li><li id="n-currentevents" class="mw-list-item"><a href="/wiki/Portal:Current_events" title="Articles related to current events"><span>Current events</span></a></li><li id="n-randompage" class="mw-list-item"><a href="/wiki/Special:Random" title="Visit a randomly selected article [x]" accesskey="x"><span>Random article</span></a></li><li id="n-aboutsite" class="mw-list-item"><a href="/wiki/Wikipedia:About" title="Learn about Wikipedia and how it works"><span>About Wikipedia</span></a></li><li id="n-contactpage" class="mw-list-item"><a href="//en.wikipedia.org/wiki/Wikipedia:Contact_us" title="How to contact Wikipedia"><span>Contact us</span></a></li> </ul> </div> </div> <div id="p-interaction" class="vector-menu mw-portlet mw-portlet-interaction" > <div class="vector-menu-heading"> Contribute </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-help" class="mw-list-item"><a href="/wiki/Help:Contents" title="Guidance on how to use and edit Wikipedia"><span>Help</span></a></li><li id="n-introduction" class="mw-list-item"><a href="/wiki/Help:Introduction" title="Learn how to edit Wikipedia"><span>Learn to edit</span></a></li><li id="n-portal" class="mw-list-item"><a href="/wiki/Wikipedia:Community_portal" title="The hub for editors"><span>Community portal</span></a></li><li id="n-recentchanges" class="mw-list-item"><a href="/wiki/Special:RecentChanges" title="A list of recent changes to Wikipedia [r]" accesskey="r"><span>Recent changes</span></a></li><li id="n-upload" class="mw-list-item"><a href="/wiki/Wikipedia:File_upload_wizard" title="Add images or other media for use on Wikipedia"><span>Upload file</span></a></li><li id="n-specialpages" class="mw-list-item"><a href="/wiki/Special:SpecialPages"><span>Special pages</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> <a href="/wiki/Main_Page" 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="The Free Encyclopedia" src="/static/images/mobile/copyright/wikipedia-tagline-en.svg" width="117" height="13" style="width: 7.3125em; 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/Special:Search" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only search-toggle" title="Search Wikipedia [f]" accesskey="f"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>Search</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="Search Wikipedia" aria-label="Search Wikipedia" autocapitalize="sentences" title="Search Wikipedia [f]" accesskey="f" id="searchInput" > <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="Special:Search"> </div> <button class="cdx-button cdx-search-input__end-button">Search</button> </form> </div> </div> </div> <nav class="vector-user-links vector-user-links-wide" aria-label="Personal tools"> <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="Appearance"> <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="Appearance" > <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">Appearance</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="https://donate.wikimedia.org/?wmf_source=donate&amp;wmf_medium=sidebar&amp;wmf_campaign=en.wikipedia.org&amp;uselang=en" class=""><span>Donate</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=Special:CreateAccount&amp;returnto=OCaml" title="You are encouraged to create an account and log in; however, it is not mandatory" class=""><span>Create account</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=Special:UserLogin&amp;returnto=OCaml" title="You&#039;re encouraged to log in; however, it&#039;s not mandatory. [o]" accesskey="o" class=""><span>Log in</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="Log in and more options" > <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="Personal tools" > <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">Personal tools</span> </label> <div class="vector-dropdown-content"> <div id="p-personal" class="vector-menu mw-portlet mw-portlet-personal user-links-collapsible-item" title="User menu" > <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="https://donate.wikimedia.org/?wmf_source=donate&amp;wmf_medium=sidebar&amp;wmf_campaign=en.wikipedia.org&amp;uselang=en"><span>Donate</span></a></li><li id="pt-createaccount" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:CreateAccount&amp;returnto=OCaml" title="You are encouraged to create an account and log in; however, it is not mandatory"><span class="vector-icon mw-ui-icon-userAdd mw-ui-icon-wikimedia-userAdd"></span> <span>Create account</span></a></li><li id="pt-login" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:UserLogin&amp;returnto=OCaml" title="You&#039;re encouraged to log in; however, it&#039;s not mandatory. [o]" accesskey="o"><span class="vector-icon mw-ui-icon-logIn mw-ui-icon-wikimedia-logIn"></span> <span>Log in</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"> Pages for logged out editors <a href="/wiki/Help:Introduction" aria-label="Learn more about editing"><span>learn more</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/Special:MyContributions" title="A list of edits made from this IP address [y]" accesskey="y"><span>Contributions</span></a></li><li id="pt-anontalk" class="mw-list-item"><a href="/wiki/Special:MyTalk" title="Discussion about edits from this IP address [n]" accesskey="n"><span>Talk</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="Site"> <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="Contents" 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">Contents</h2> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-toc.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-toc.unpin">hide</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">(Top)</div> </a> </li> <li id="toc-Philosophy" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Philosophy"> <div class="vector-toc-text"> <span class="vector-toc-numb">1</span> <span>Philosophy</span> </div> </a> <ul id="toc-Philosophy-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-History" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#History"> <div class="vector-toc-text"> <span class="vector-toc-numb">2</span> <span>History</span> </div> </a> <button aria-controls="toc-History-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>Toggle History subsection</span> </button> <ul id="toc-History-sublist" class="vector-toc-list"> <li id="toc-Development_of_ML_(Meta_Language)" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Development_of_ML_(Meta_Language)"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.1</span> <span>Development of ML (Meta Language)</span> </div> </a> <ul id="toc-Development_of_ML_(Meta_Language)-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-First_implementation" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#First_implementation"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.2</span> <span>First implementation</span> </div> </a> <ul id="toc-First_implementation-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Caml_Light" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Caml_Light"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.3</span> <span>Caml Light</span> </div> </a> <ul id="toc-Caml_Light-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Caml_Special_Light" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Caml_Special_Light"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.4</span> <span>Caml Special Light</span> </div> </a> <ul id="toc-Caml_Special_Light-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Objective_Caml" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Objective_Caml"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.5</span> <span>Objective Caml</span> </div> </a> <ul id="toc-Objective_Caml-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Ongoing_development" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Ongoing_development"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.6</span> <span>Ongoing development</span> </div> </a> <ul id="toc-Ongoing_development-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Features" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Features"> <div class="vector-toc-text"> <span class="vector-toc-numb">3</span> <span>Features</span> </div> </a> <ul id="toc-Features-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Code_examples" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Code_examples"> <div class="vector-toc-text"> <span class="vector-toc-numb">4</span> <span>Code examples</span> </div> </a> <button aria-controls="toc-Code_examples-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>Toggle Code examples subsection</span> </button> <ul id="toc-Code_examples-sublist" class="vector-toc-list"> <li id="toc-Hello_World" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Hello_World"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.1</span> <span>Hello World</span> </div> </a> <ul id="toc-Hello_World-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Option" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Option"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.2</span> <span>Option</span> </div> </a> <ul id="toc-Option-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Summing_a_list_of_integers" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Summing_a_list_of_integers"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.3</span> <span>Summing a list of integers</span> </div> </a> <ul id="toc-Summing_a_list_of_integers-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Quicksort" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Quicksort"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.4</span> <span>Quicksort</span> </div> </a> <ul id="toc-Quicksort-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Birthday_problem" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Birthday_problem"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.5</span> <span>Birthday problem</span> </div> </a> <ul id="toc-Birthday_problem-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Church_numerals" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Church_numerals"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.6</span> <span>Church numerals</span> </div> </a> <ul id="toc-Church_numerals-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Arbitrary-precision_factorial_function_(libraries)" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Arbitrary-precision_factorial_function_(libraries)"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.7</span> <span>Arbitrary-precision factorial function (libraries)</span> </div> </a> <ul id="toc-Arbitrary-precision_factorial_function_(libraries)-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Triangle_(graphics)" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Triangle_(graphics)"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.8</span> <span>Triangle (graphics)</span> </div> </a> <ul id="toc-Triangle_(graphics)-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Fibonacci_sequence" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Fibonacci_sequence"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.9</span> <span>Fibonacci sequence</span> </div> </a> <ul id="toc-Fibonacci_sequence-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Higher-order_functions" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Higher-order_functions"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.10</span> <span>Higher-order functions</span> </div> </a> <ul id="toc-Higher-order_functions-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Derived_languages" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Derived_languages"> <div class="vector-toc-text"> <span class="vector-toc-numb">5</span> <span>Derived languages</span> </div> </a> <button aria-controls="toc-Derived_languages-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>Toggle Derived languages subsection</span> </button> <ul id="toc-Derived_languages-sublist" class="vector-toc-list"> <li id="toc-MetaOCaml" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#MetaOCaml"> <div class="vector-toc-text"> <span class="vector-toc-numb">5.1</span> <span>MetaOCaml</span> </div> </a> <ul id="toc-MetaOCaml-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Other_derived_languages" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Other_derived_languages"> <div class="vector-toc-text"> <span class="vector-toc-numb">5.2</span> <span>Other derived languages</span> </div> </a> <ul id="toc-Other_derived_languages-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Software_written_in_OCaml" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Software_written_in_OCaml"> <div class="vector-toc-text"> <span class="vector-toc-numb">6</span> <span>Software written in OCaml</span> </div> </a> <ul id="toc-Software_written_in_OCaml-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Users" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Users"> <div class="vector-toc-text"> <span class="vector-toc-numb">7</span> <span>Users</span> </div> </a> <ul id="toc-Users-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-References" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#References"> <div class="vector-toc-text"> <span class="vector-toc-numb">8</span> <span>References</span> </div> </a> <ul id="toc-References-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-External_links" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#External_links"> <div class="vector-toc-text"> <span class="vector-toc-numb">9</span> <span>External links</span> </div> </a> <ul id="toc-External_links-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="Contents" class="vector-toc-landmark"> <div id="vector-page-titlebar-toc" class="vector-dropdown vector-page-titlebar-toc vector-button-flush-left" title="Table of Contents" > <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="Toggle the table of contents" > <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">Toggle the table of contents</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">OCaml</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="Go to an article in another language. Available in 33 languages" > <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-33" 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">33 languages</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/%D9%84%D8%BA%D8%A9_%D9%83%D8%A7%D9%85%D9%84_%D8%A7%D9%84%D9%85%D9%88%D8%B6%D9%88%D8%B9%D9%8A%D8%A9" title="لغة كامل الموضوعية – Arabic" lang="ar" hreflang="ar" data-title="لغة كامل الموضوعية" data-language-autonym="العربية" data-language-local-name="Arabic" class="interlanguage-link-target"><span>العربية</span></a></li><li class="interlanguage-link interwiki-az mw-list-item"><a href="https://az.wikipedia.org/wiki/OCaml" title="OCaml – Azerbaijani" lang="az" hreflang="az" data-title="OCaml" data-language-autonym="Azərbaycanca" data-language-local-name="Azerbaijani" class="interlanguage-link-target"><span>Azərbaycanca</span></a></li><li class="interlanguage-link interwiki-ca mw-list-item"><a href="https://ca.wikipedia.org/wiki/OCaml" title="OCaml – Catalan" lang="ca" hreflang="ca" data-title="OCaml" data-language-autonym="Català" data-language-local-name="Catalan" 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/OCaml" title="OCaml – Czech" lang="cs" hreflang="cs" data-title="OCaml" data-language-autonym="Čeština" data-language-local-name="Czech" 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/OCaml" title="OCaml – Danish" lang="da" hreflang="da" data-title="OCaml" data-language-autonym="Dansk" data-language-local-name="Danish" 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/OCaml" title="OCaml – German" lang="de" hreflang="de" data-title="OCaml" data-language-autonym="Deutsch" data-language-local-name="German" class="interlanguage-link-target"><span>Deutsch</span></a></li><li class="interlanguage-link interwiki-el mw-list-item"><a href="https://el.wikipedia.org/wiki/OCaml" title="OCaml – Greek" lang="el" hreflang="el" data-title="OCaml" data-language-autonym="Ελληνικά" data-language-local-name="Greek" class="interlanguage-link-target"><span>Ελληνικά</span></a></li><li class="interlanguage-link interwiki-es mw-list-item"><a href="https://es.wikipedia.org/wiki/OCaml" title="OCaml – Spanish" lang="es" hreflang="es" data-title="OCaml" data-language-autonym="Español" data-language-local-name="Spanish" class="interlanguage-link-target"><span>Español</span></a></li><li class="interlanguage-link interwiki-fa mw-list-item"><a href="https://fa.wikipedia.org/wiki/%D8%A7%DA%A9%D9%85%D9%84" title="اکمل – Persian" lang="fa" hreflang="fa" data-title="اکمل" data-language-autonym="فارسی" data-language-local-name="Persian" class="interlanguage-link-target"><span>فارسی</span></a></li><li class="interlanguage-link interwiki-fr mw-list-item"><a href="https://fr.wikipedia.org/wiki/OCaml" title="OCaml – French" lang="fr" hreflang="fr" data-title="OCaml" data-language-autonym="Français" data-language-local-name="French" class="interlanguage-link-target"><span>Français</span></a></li><li class="interlanguage-link interwiki-gl mw-list-item"><a href="https://gl.wikipedia.org/wiki/Ocaml" title="Ocaml – Galician" lang="gl" hreflang="gl" data-title="Ocaml" data-language-autonym="Galego" data-language-local-name="Galician" class="interlanguage-link-target"><span>Galego</span></a></li><li class="interlanguage-link interwiki-ko mw-list-item"><a href="https://ko.wikipedia.org/wiki/OCaml" title="OCaml – Korean" lang="ko" hreflang="ko" data-title="OCaml" data-language-autonym="한국어" data-language-local-name="Korean" class="interlanguage-link-target"><span>한국어</span></a></li><li class="interlanguage-link interwiki-it mw-list-item"><a href="https://it.wikipedia.org/wiki/OCaml" title="OCaml – Italian" lang="it" hreflang="it" data-title="OCaml" data-language-autonym="Italiano" data-language-local-name="Italian" class="interlanguage-link-target"><span>Italiano</span></a></li><li class="interlanguage-link interwiki-he mw-list-item"><a href="https://he.wikipedia.org/wiki/OCaml" title="OCaml – Hebrew" lang="he" hreflang="he" data-title="OCaml" data-language-autonym="עברית" data-language-local-name="Hebrew" class="interlanguage-link-target"><span>עברית</span></a></li><li class="interlanguage-link interwiki-ka mw-list-item"><a href="https://ka.wikipedia.org/wiki/%E1%83%9D%E1%83%91%E1%83%98%E1%83%94%E1%83%A5%E1%83%A2%E1%83%A3%E1%83%A0%E1%83%98_%E1%83%99%E1%83%90%E1%83%9B%E1%83%9A%E1%83%98" title="ობიექტური კამლი – Georgian" lang="ka" hreflang="ka" data-title="ობიექტური კამლი" data-language-autonym="ქართული" data-language-local-name="Georgian" 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%92%E0%B4%95%E0%B4%BE%E0%B4%AE%E0%B5%BD" title="ഒകാമൽ – Malayalam" lang="ml" hreflang="ml" data-title="ഒകാമൽ" data-language-autonym="മലയാളം" data-language-local-name="Malayalam" class="interlanguage-link-target"><span>മലയാളം</span></a></li><li class="interlanguage-link interwiki-ms mw-list-item"><a href="https://ms.wikipedia.org/wiki/OCaml" title="OCaml – Malay" lang="ms" hreflang="ms" data-title="OCaml" data-language-autonym="Bahasa Melayu" data-language-local-name="Malay" 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/Ocaml" title="Ocaml – Dutch" lang="nl" hreflang="nl" data-title="Ocaml" data-language-autonym="Nederlands" data-language-local-name="Dutch" class="interlanguage-link-target"><span>Nederlands</span></a></li><li class="interlanguage-link interwiki-ja mw-list-item"><a href="https://ja.wikipedia.org/wiki/OCaml" title="OCaml – Japanese" lang="ja" hreflang="ja" data-title="OCaml" data-language-autonym="日本語" data-language-local-name="Japanese" class="interlanguage-link-target"><span>日本語</span></a></li><li class="interlanguage-link interwiki-no mw-list-item"><a href="https://no.wikipedia.org/wiki/OCaml" title="OCaml – Norwegian Bokmål" lang="nb" hreflang="nb" data-title="OCaml" data-language-autonym="Norsk bokmål" data-language-local-name="Norwegian Bokmål" class="interlanguage-link-target"><span>Norsk bokmål</span></a></li><li class="interlanguage-link interwiki-nn mw-list-item"><a href="https://nn.wikipedia.org/wiki/OCaml" title="OCaml – Norwegian Nynorsk" lang="nn" hreflang="nn" data-title="OCaml" data-language-autonym="Norsk nynorsk" data-language-local-name="Norwegian Nynorsk" class="interlanguage-link-target"><span>Norsk nynorsk</span></a></li><li class="interlanguage-link interwiki-pl mw-list-item"><a href="https://pl.wikipedia.org/wiki/OCaml" title="OCaml – Polish" lang="pl" hreflang="pl" data-title="OCaml" data-language-autonym="Polski" data-language-local-name="Polish" 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/OCaml" title="OCaml – Portuguese" lang="pt" hreflang="pt" data-title="OCaml" data-language-autonym="Português" data-language-local-name="Portuguese" 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/OCaml" title="OCaml – Russian" lang="ru" hreflang="ru" data-title="OCaml" data-language-autonym="Русский" data-language-local-name="Russian" class="interlanguage-link-target"><span>Русский</span></a></li><li class="interlanguage-link interwiki-sq mw-list-item"><a href="https://sq.wikipedia.org/wiki/OCaml" title="OCaml – Albanian" lang="sq" hreflang="sq" data-title="OCaml" data-language-autonym="Shqip" data-language-local-name="Albanian" class="interlanguage-link-target"><span>Shqip</span></a></li><li class="interlanguage-link interwiki-simple mw-list-item"><a href="https://simple.wikipedia.org/wiki/OCaml" title="OCaml – Simple English" lang="en-simple" hreflang="en-simple" data-title="OCaml" data-language-autonym="Simple English" data-language-local-name="Simple English" class="interlanguage-link-target"><span>Simple English</span></a></li><li class="interlanguage-link interwiki-sl mw-list-item"><a href="https://sl.wikipedia.org/wiki/Ocaml" title="Ocaml – Slovenian" lang="sl" hreflang="sl" data-title="Ocaml" data-language-autonym="Slovenščina" data-language-local-name="Slovenian" class="interlanguage-link-target"><span>Slovenščina</span></a></li><li class="interlanguage-link interwiki-fi mw-list-item"><a href="https://fi.wikipedia.org/wiki/OCaml" title="OCaml – Finnish" lang="fi" hreflang="fi" data-title="OCaml" data-language-autonym="Suomi" data-language-local-name="Finnish" class="interlanguage-link-target"><span>Suomi</span></a></li><li class="interlanguage-link interwiki-tg mw-list-item"><a href="https://tg.wikipedia.org/wiki/OCaml" title="OCaml – Tajik" lang="tg" hreflang="tg" data-title="OCaml" data-language-autonym="Тоҷикӣ" data-language-local-name="Tajik" class="interlanguage-link-target"><span>Тоҷикӣ</span></a></li><li class="interlanguage-link interwiki-tr mw-list-item"><a href="https://tr.wikipedia.org/wiki/OCaml" title="OCaml – Turkish" lang="tr" hreflang="tr" data-title="OCaml" data-language-autonym="Türkçe" data-language-local-name="Turkish" 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/Objective_Caml" title="Objective Caml – Ukrainian" lang="uk" hreflang="uk" data-title="Objective Caml" data-language-autonym="Українська" data-language-local-name="Ukrainian" class="interlanguage-link-target"><span>Українська</span></a></li><li class="interlanguage-link interwiki-vi mw-list-item"><a href="https://vi.wikipedia.org/wiki/OCaml" title="OCaml – Vietnamese" lang="vi" hreflang="vi" data-title="OCaml" data-language-autonym="Tiếng Việt" data-language-local-name="Vietnamese" class="interlanguage-link-target"><span>Tiếng Việt</span></a></li><li class="interlanguage-link interwiki-zh mw-list-item"><a href="https://zh.wikipedia.org/wiki/OCaml" title="OCaml – Chinese" lang="zh" hreflang="zh" data-title="OCaml" data-language-autonym="中文" data-language-local-name="Chinese" 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/Q212587#sitelinks-wikipedia" title="Edit interlanguage links" class="wbc-editpage">Edit links</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="Namespaces"> <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/OCaml" title="View the content page [c]" accesskey="c"><span>Article</span></a></li><li id="ca-talk" class="vector-tab-noicon mw-list-item"><a href="/wiki/Talk:OCaml" rel="discussion" title="Discuss improvements to the content page [t]" accesskey="t"><span>Talk</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="Change language variant" > <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">English</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="Views"> <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/OCaml"><span>Read</span></a></li><li id="ca-edit" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=OCaml&amp;action=edit" title="Edit this page [e]" accesskey="e"><span>Edit</span></a></li><li id="ca-history" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=OCaml&amp;action=history" title="Past revisions of this page [h]" accesskey="h"><span>View history</span></a></li> </ul> </div> </div> </nav> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <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="Tools" > <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">Tools</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">Tools</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-page-tools.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-page-tools.unpin">hide</button> </div> <div id="p-cactions" class="vector-menu mw-portlet mw-portlet-cactions emptyPortlet vector-has-collapsible-items" title="More options" > <div class="vector-menu-heading"> Actions </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/OCaml"><span>Read</span></a></li><li id="ca-more-edit" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=OCaml&amp;action=edit" title="Edit this page [e]" accesskey="e"><span>Edit</span></a></li><li id="ca-more-history" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=OCaml&amp;action=history"><span>View history</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/Special:WhatLinksHere/OCaml" title="List of all English Wikipedia pages containing links to this page [j]" accesskey="j"><span>What links here</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/wiki/Special:RecentChangesLinked/OCaml" rel="nofollow" title="Recent changes in pages linked from this page [k]" accesskey="k"><span>Related changes</span></a></li><li id="t-upload" class="mw-list-item"><a href="//en.wikipedia.org/wiki/Wikipedia:File_Upload_Wizard" title="Upload files [u]" accesskey="u"><span>Upload file</span></a></li><li id="t-permalink" class="mw-list-item"><a href="/w/index.php?title=OCaml&amp;oldid=1276758030" title="Permanent link to this revision of this page"><span>Permanent link</span></a></li><li id="t-info" class="mw-list-item"><a href="/w/index.php?title=OCaml&amp;action=info" title="More information about this page"><span>Page information</span></a></li><li id="t-cite" class="mw-list-item"><a href="/w/index.php?title=Special:CiteThisPage&amp;page=OCaml&amp;id=1276758030&amp;wpFormIdentifier=titleform" title="Information on how to cite this page"><span>Cite this page</span></a></li><li id="t-urlshortener" class="mw-list-item"><a href="/w/index.php?title=Special:UrlShortener&amp;url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FOCaml"><span>Get shortened URL</span></a></li><li id="t-urlshortener-qrcode" class="mw-list-item"><a href="/w/index.php?title=Special:QrCode&amp;url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FOCaml"><span>Download QR code</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"> Print/export </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="coll-download-as-rl" class="mw-list-item"><a href="/w/index.php?title=Special:DownloadAsPdf&amp;page=OCaml&amp;action=show-download-screen" title="Download this page as a PDF file"><span>Download as PDF</span></a></li><li id="t-print" class="mw-list-item"><a href="/w/index.php?title=OCaml&amp;printable=yes" title="Printable version of this page [p]" accesskey="p"><span>Printable version</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"> In other projects </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:OCaml" hreflang="en"><span>Wikimedia Commons</span></a></li><li class="wb-otherproject-link wb-otherproject-wikibooks mw-list-item"><a href="https://en.wikibooks.org/wiki/OCaml" hreflang="en"><span>Wikibooks</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/Q212587" title="Structured data on this page hosted by Wikidata [g]" accesskey="g"><span>Wikidata item</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="Page tools"> <div id="vector-page-tools-pinned-container" class="vector-pinned-container"> </div> </nav> <nav class="vector-appearance-landmark" aria-label="Appearance"> <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">Appearance</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-appearance.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-appearance.unpin">hide</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">From Wikipedia, the free encyclopedia</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="en" dir="ltr"><div class="shortdescription nomobile noexcerpt noprint searchaux" style="display:none">Programming language</div> <style data-mw-deduplicate="TemplateStyles:r1236090951">.mw-parser-output .hatnote{font-style:italic}.mw-parser-output div.hatnote{padding-left:1.6em;margin-bottom:0.5em}.mw-parser-output .hatnote i{font-style:normal}.mw-parser-output .hatnote+link+.hatnote{margin-top:-0.5em}@media print{body.ns-0 .mw-parser-output .hatnote{display:none!important}}</style><div role="note" class="hatnote navigation-not-searchable">Not to be confused with <a href="/wiki/Occam_(programming_language)" title="Occam (programming language)">occam (programming language)</a>.</div> <p class="mw-empty-elt"> </p> <style data-mw-deduplicate="TemplateStyles:r1129693374">.mw-parser-output .hlist dl,.mw-parser-output .hlist ol,.mw-parser-output .hlist ul{margin:0;padding:0}.mw-parser-output .hlist dd,.mw-parser-output .hlist dt,.mw-parser-output .hlist li{margin:0;display:inline}.mw-parser-output .hlist.inline,.mw-parser-output .hlist.inline dl,.mw-parser-output .hlist.inline ol,.mw-parser-output .hlist.inline ul,.mw-parser-output .hlist dl dl,.mw-parser-output .hlist dl ol,.mw-parser-output .hlist dl ul,.mw-parser-output .hlist ol dl,.mw-parser-output .hlist ol ol,.mw-parser-output .hlist ol ul,.mw-parser-output .hlist ul dl,.mw-parser-output .hlist ul ol,.mw-parser-output .hlist ul ul{display:inline}.mw-parser-output .hlist .mw-empty-li{display:none}.mw-parser-output .hlist dt::after{content:": "}.mw-parser-output .hlist dd::after,.mw-parser-output .hlist li::after{content:" · ";font-weight:bold}.mw-parser-output .hlist dd:last-child::after,.mw-parser-output .hlist dt:last-child::after,.mw-parser-output .hlist li:last-child::after{content:none}.mw-parser-output .hlist dd dd:first-child::before,.mw-parser-output .hlist dd dt:first-child::before,.mw-parser-output .hlist dd li:first-child::before,.mw-parser-output .hlist dt dd:first-child::before,.mw-parser-output .hlist dt dt:first-child::before,.mw-parser-output .hlist dt li:first-child::before,.mw-parser-output .hlist li dd:first-child::before,.mw-parser-output .hlist li dt:first-child::before,.mw-parser-output .hlist li li:first-child::before{content:" (";font-weight:normal}.mw-parser-output .hlist dd dd:last-child::after,.mw-parser-output .hlist dd dt:last-child::after,.mw-parser-output .hlist dd li:last-child::after,.mw-parser-output .hlist dt dd:last-child::after,.mw-parser-output .hlist dt dt:last-child::after,.mw-parser-output .hlist dt li:last-child::after,.mw-parser-output .hlist li dd:last-child::after,.mw-parser-output .hlist li dt:last-child::after,.mw-parser-output .hlist li li:last-child::after{content:")";font-weight:normal}.mw-parser-output .hlist ol{counter-reset:listitem}.mw-parser-output .hlist ol>li{counter-increment:listitem}.mw-parser-output .hlist ol>li::before{content:" "counter(listitem)"\a0 "}.mw-parser-output .hlist dd ol>li:first-child::before,.mw-parser-output .hlist dt ol>li:first-child::before,.mw-parser-output .hlist li ol>li:first-child::before{content:" ("counter(listitem)"\a0 "}</style><style data-mw-deduplicate="TemplateStyles:r1257001546">.mw-parser-output .infobox-subbox{padding:0;border:none;margin:-3px;width:auto;min-width:100%;font-size:100%;clear:none;float:none;background-color:transparent}.mw-parser-output .infobox-3cols-child{margin:auto}.mw-parser-output .infobox .navbar{font-size:100%}@media screen{html.skin-theme-clientpref-night .mw-parser-output .infobox-full-data:not(.notheme)>div:not(.notheme)[style]{background:#1f1f23!important;color:#f8f9fa}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .infobox-full-data:not(.notheme) div:not(.notheme){background:#1f1f23!important;color:#f8f9fa}}@media(min-width:640px){body.skin--responsive .mw-parser-output .infobox-table{display:table!important}body.skin--responsive .mw-parser-output .infobox-table>caption{display:table-caption!important}body.skin--responsive .mw-parser-output .infobox-table>tbody{display:table-row-group}body.skin--responsive .mw-parser-output .infobox-table tr{display:table-row!important}body.skin--responsive .mw-parser-output .infobox-table th,body.skin--responsive .mw-parser-output .infobox-table td{padding-left:inherit;padding-right:inherit}}</style><table class="infobox vevent"><caption class="infobox-title summary">OCaml</caption><tbody><tr><td colspan="2" class="infobox-image"><span typeof="mw:File"><a href="/wiki/File:OCaml_Logo.svg" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/f/ff/OCaml_Logo.svg/121px-OCaml_Logo.svg.png" decoding="async" width="121" height="33" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/f/ff/OCaml_Logo.svg/182px-OCaml_Logo.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/f/ff/OCaml_Logo.svg/242px-OCaml_Logo.svg.png 2x" data-file-width="525" data-file-height="144" /></a></span></td></tr><tr><th scope="row" class="infobox-label"><a href="/wiki/Programming_paradigm" title="Programming paradigm">Paradigms</a></th><td class="infobox-data"><a href="/wiki/Programming_paradigm#Multi-paradigm" title="Programming paradigm">Multi-paradigm</a>: <a href="/wiki/Functional_programming" title="Functional programming">functional</a>, <a href="/wiki/Imperative_programming" title="Imperative programming">imperative</a>, <a href="/wiki/Modular_programming" title="Modular programming">modular</a>,<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">&#91;</span>1<span class="cite-bracket">&#93;</span></a></sup> <a href="/wiki/Object-oriented_programming" title="Object-oriented programming">object-oriented</a></td></tr><tr><th scope="row" class="infobox-label">Family</th><td class="infobox-data"><a href="/wiki/ML_(programming_language)" title="ML (programming language)">ML</a>: <a href="/wiki/Caml" title="Caml">Caml</a></td></tr><tr><th scope="row" class="infobox-label"><a href="/wiki/Software_design" title="Software design">Designed&#160;by</a></th><td class="infobox-data"><a href="/wiki/Xavier_Leroy" title="Xavier Leroy">Xavier Leroy</a>, Jérôme Vouillon, <a href="/wiki/Damien_Doligez" title="Damien Doligez">Damien Doligez</a>, Didier Rémy, Ascánder Suárez</td></tr><tr><th scope="row" class="infobox-label"><a href="/wiki/Software_developer" class="mw-redirect" title="Software developer">Developer</a></th><td class="infobox-data organiser"><a href="/wiki/French_Institute_for_Research_in_Computer_Science_and_Automation" title="French Institute for Research in Computer Science and Automation">Inria</a></td></tr><tr><th scope="row" class="infobox-label">First&#160;appeared</th><td class="infobox-data">1996<span class="noprint">&#59;&#32;29&#160;years ago</span><span style="display:none">&#160;(<span class="bday dtstart published updated">1996</span>)</span><sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">&#91;</span>2<span class="cite-bracket">&#93;</span></a></sup></td></tr><tr><td colspan="2" class="infobox-full-data"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1257001546" /></td></tr><tr><th scope="row" class="infobox-label" style="white-space: nowrap;"><a href="/wiki/Software_release_life_cycle" title="Software release life cycle">Stable release</a></th><td class="infobox-data"><div style="margin:0px;">5.3.0<sup id="cite_ref-wikidata-34447fdd2960f8e7ad4f5ce6624650819a99db73-v18_3-0" class="reference"><a href="#cite_note-wikidata-34447fdd2960f8e7ad4f5ce6624650819a99db73-v18-3"><span class="cite-bracket">&#91;</span>3<span class="cite-bracket">&#93;</span></a></sup>&#160;<span class="mw-valign-text-top" typeof="mw:File/Frameless"><a href="https://www.wikidata.org/wiki/Q212587?uselang=en#P348" title="Edit this on Wikidata"><img alt="Edit this on Wikidata" src="//upload.wikimedia.org/wikipedia/en/thumb/8/8a/OOjs_UI_icon_edit-ltr-progressive.svg/10px-OOjs_UI_icon_edit-ltr-progressive.svg.png" decoding="async" width="10" height="10" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/en/thumb/8/8a/OOjs_UI_icon_edit-ltr-progressive.svg/15px-OOjs_UI_icon_edit-ltr-progressive.svg.png 1.5x, //upload.wikimedia.org/wikipedia/en/thumb/8/8a/OOjs_UI_icon_edit-ltr-progressive.svg/20px-OOjs_UI_icon_edit-ltr-progressive.svg.png 2x" data-file-width="20" data-file-height="20" /></a></span> / 8 January 2025<span class="noprint">&#59;&#32;2 months ago</span><span style="display:none">&#160;(<span class="bday dtstart published updated">8 January 2025</span>)</span></div></td></tr><tr style="display:none"><td colspan="2"> </td></tr><tr><th scope="row" class="infobox-label"><a href="/wiki/Type_system" title="Type system">Typing discipline</a></th><td class="infobox-data"><a href="/wiki/Type_inference" title="Type inference">Inferred</a>, <a href="/wiki/Static_typing" class="mw-redirect" title="Static typing">static</a>, <a href="/wiki/Strong_and_weak_typing" title="Strong and weak typing">strong</a>, <a href="/wiki/Structural_typing" class="mw-redirect" title="Structural typing">structural</a></td></tr><tr><th scope="row" class="infobox-label">Implementation language</th><td class="infobox-data">OCaml, <a href="/wiki/C_(programming_language)" title="C (programming language)">C</a></td></tr><tr><th scope="row" class="infobox-label"><a href="/wiki/Computing_platform" title="Computing platform">Platform</a></th><td class="infobox-data"><a href="/wiki/IA-32" title="IA-32">IA-32</a>, <a href="/wiki/X86-64" title="X86-64">x86-64</a>, <a href="/wiki/Power_ISA" title="Power ISA">Power</a>, <a href="/wiki/SPARC" title="SPARC">SPARC</a>, <a href="/wiki/ARM_architecture" class="mw-redirect" title="ARM architecture">ARM 32-64</a>, <a href="/wiki/RISC-V" title="RISC-V">RISC-V</a></td></tr><tr><th scope="row" class="infobox-label"><a href="/wiki/Operating_system" title="Operating system">OS</a></th><td class="infobox-data"><a href="/wiki/Cross-platform_software" title="Cross-platform software">Cross-platform</a>: <a href="/wiki/Linux" title="Linux">Linux</a>, <a href="/wiki/Unix" title="Unix">Unix</a>, <a href="/wiki/MacOS" title="MacOS">macOS</a>, <a href="/wiki/Microsoft_Windows" title="Microsoft Windows">Windows</a></td></tr><tr><th scope="row" class="infobox-label"><a href="/wiki/Software_license" title="Software license">License</a></th><td class="infobox-data"><a href="/wiki/GNU_Lesser_General_Public_License" title="GNU Lesser General Public License">LGPLv2.1</a></td></tr><tr><th scope="row" class="infobox-label"><a href="/wiki/Filename_extension" title="Filename extension">Filename extensions</a></th><td class="infobox-data">.ml, .mli</td></tr><tr><th scope="row" class="infobox-label">Website</th><td class="infobox-data"><span class="url"><a rel="nofollow" class="external text" href="https://ocaml.org/">ocaml<wbr />.org</a></span></td></tr><tr><th colspan="2" class="infobox-header" style="background-color: #eee;">Influenced by</th></tr><tr><td colspan="2" class="infobox-full-data"><a href="/wiki/C_(programming_language)" title="C (programming language)">C</a>, <a href="/wiki/Caml" title="Caml">Caml</a>, <a href="/wiki/Modula-3" title="Modula-3">Modula-3</a>, <a href="/wiki/Pascal_(programming_language)" title="Pascal (programming language)">Pascal</a>, <a href="/wiki/Standard_ML" title="Standard ML">Standard ML</a></td></tr><tr><th colspan="2" class="infobox-header" style="background-color: #eee;">Influenced</th></tr><tr><td colspan="2" class="infobox-full-data"><a href="/wiki/ATS_(programming_language)" title="ATS (programming language)">ATS</a>, <a href="/wiki/Coq_(software)" class="mw-redirect" title="Coq (software)">Coq</a>, <a href="/wiki/Elm_(programming_language)" title="Elm (programming language)">Elm</a>, <a href="/wiki/F_Sharp_(programming_language)" title="F Sharp (programming language)">F#</a>, <a href="/wiki/F*_(programming_language)" title="F* (programming language)">F*</a>, <a href="/wiki/Haxe" title="Haxe">Haxe</a>, <a href="/wiki/Opa_(programming_language)" title="Opa (programming language)">Opa</a>, <a href="/wiki/Rust_(programming_language)" title="Rust (programming language)">Rust</a>,<sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite-bracket">&#91;</span>4<span class="cite-bracket">&#93;</span></a></sup> <a href="/wiki/Scala_(programming_language)" title="Scala (programming language)">Scala</a></td></tr><tr><td colspan="2" class="infobox-below hlist" style="border-top: 1px solid #aaa; padding-top: 3px;"> <ul><li><span class="noviewer" typeof="mw:File"><a href="/wiki/File:Wikibooks-logo-en-noslogan.svg" class="mw-file-description"><img alt="" src="//upload.wikimedia.org/wikipedia/commons/thumb/d/df/Wikibooks-logo-en-noslogan.svg/16px-Wikibooks-logo-en-noslogan.svg.png" decoding="async" width="16" height="16" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/d/df/Wikibooks-logo-en-noslogan.svg/24px-Wikibooks-logo-en-noslogan.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/d/df/Wikibooks-logo-en-noslogan.svg/32px-Wikibooks-logo-en-noslogan.svg.png 2x" data-file-width="400" data-file-height="400" /></a></span> <a href="https://en.wikibooks.org/wiki/Objective_Caml" class="extiw" title="wikibooks:Objective Caml">Objective Caml</a> at Wikibooks</li></ul> </td></tr></tbody></table> <p><b>OCaml</b> (<span class="rt-commentedText nowrap"><span class="IPA nopopups noexcerpt" lang="en-fonipa"><a href="/wiki/Help:IPA/English" title="Help:IPA/English">/<span style="border-bottom:1px dotted"><span title="/oʊ/: &#39;o&#39; in &#39;code&#39;">oʊ</span><span title="/ˈ/: primary stress follows">ˈ</span><span title="&#39;k&#39; in &#39;kind&#39;">k</span><span title="/æ/: &#39;a&#39; in &#39;bad&#39;">æ</span><span title="&#39;m&#39; in &#39;my&#39;">m</span><span title="/əl/: &#39;le&#39; in &#39;bottle&#39;">əl</span></span>/</a></span></span> <a href="/wiki/Help:Pronunciation_respelling_key" title="Help:Pronunciation respelling key"><i title="English pronunciation respelling">oh-<span style="font-size:90%">KAM</span>-əl</i></a>, formerly <b>Objective Caml</b>) is a <a href="/wiki/General-purpose_programming_language" title="General-purpose programming language">general-purpose</a>, <a href="/wiki/High-level_programming_language" title="High-level programming language">high-level</a>, <a href="/wiki/Comparison_of_multi-paradigm_programming_languages" title="Comparison of multi-paradigm programming languages">multi-paradigm</a> <a href="/wiki/Programming_language" title="Programming language">programming language</a> which extends the <a href="/wiki/Caml" title="Caml">Caml</a> dialect of <a href="/wiki/ML_(programming_language)" title="ML (programming language)">ML</a> with <a href="/wiki/Object-oriented_programming" title="Object-oriented programming">object-oriented</a> features. OCaml was created in 1996 by <a href="/wiki/Xavier_Leroy" title="Xavier Leroy">Xavier Leroy</a>, Jérôme Vouillon,<sup id="cite_ref-5" class="reference"><a href="#cite_note-5"><span class="cite-bracket">&#91;</span>5<span class="cite-bracket">&#93;</span></a></sup> <a href="/wiki/Damien_Doligez" title="Damien Doligez">Damien Doligez</a>, Didier Rémy,<sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite-bracket">&#91;</span>6<span class="cite-bracket">&#93;</span></a></sup> Ascánder Suárez, and others. </p><p>The OCaml <a href="/wiki/Toolchain" title="Toolchain">toolchain</a> includes an interactive top-level <a href="/wiki/Interpreter_(computing)" title="Interpreter (computing)">interpreter</a>, a <a href="/wiki/Bytecode" title="Bytecode">bytecode</a> <a href="/wiki/Compiler" title="Compiler">compiler</a>, an optimizing <a href="/wiki/Native_code" class="mw-redirect" title="Native code">native code</a> compiler, a reversible <a href="/wiki/Debugger" title="Debugger">debugger</a>, and a <a href="/wiki/Package_manager" title="Package manager">package manager</a> (<a rel="nofollow" class="external text" href="https://opam.ocaml.org/packages/">OPAM</a>) together with a composable build system for OCaml (<a rel="nofollow" class="external text" href="https://dune.build/">Dune</a>). OCaml was initially developed in the context of <a href="/wiki/Automated_theorem_proving" title="Automated theorem proving">automated theorem proving</a>, and is used in <a href="/wiki/Static_program_analysis" title="Static program analysis">static analysis</a> and <a href="/wiki/Formal_methods" title="Formal methods">formal methods</a> software. Beyond these areas, it has found use in <a href="/wiki/Systems_programming" title="Systems programming">systems programming</a>, <a href="/wiki/Web_development" title="Web development">web development</a>, and specific financial utilities, among other application domains. </p><p>The acronym <i>CAML</i> originally stood for <i>Categorical Abstract Machine Language</i>, but OCaml omits this <a href="/wiki/Abstract_machine" title="Abstract machine">abstract machine</a>.<sup id="cite_ref-7" class="reference"><a href="#cite_note-7"><span class="cite-bracket">&#91;</span>7<span class="cite-bracket">&#93;</span></a></sup> OCaml is a <a href="/wiki/Free_and_open-source_software" title="Free and open-source software">free and open-source software</a> project managed and principally maintained by the <a href="/wiki/French_Institute_for_Research_in_Computer_Science_and_Automation" title="French Institute for Research in Computer Science and Automation">French Institute for Research in Computer Science and Automation</a> (Inria). In the early 2000s, elements from OCaml were adopted by many languages, notably <a href="/wiki/F_Sharp_(programming_language)" title="F Sharp (programming language)">F#</a> and <a href="/wiki/Scala_(programming_language)" title="Scala (programming language)">Scala</a>. </p> <meta property="mw:PageProp/toc" /> <div class="mw-heading mw-heading2"><h2 id="Philosophy">Philosophy</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=OCaml&amp;action=edit&amp;section=1" title="Edit section: Philosophy"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="/wiki/ML_(programming_language)" title="ML (programming language)">ML</a>-derived languages are best known for their static <a href="/wiki/Type_system" title="Type system">type systems</a> and <a href="/wiki/Type_inference" title="Type inference">type-inferring</a> compilers. OCaml unifies <a href="/wiki/Functional_programming" title="Functional programming">functional</a>, <a href="/wiki/Imperative_programming" title="Imperative programming">imperative</a>, and <a href="/wiki/Object-oriented_programming" title="Object-oriented programming">object-oriented programming</a> under an ML-like type system. Thus, programmers need not be highly familiar with the pure functional language <a href="/wiki/Programming_paradigm" title="Programming paradigm">paradigm</a> to use OCaml. </p><p>By requiring the programmer to work within the constraints of its static <a href="/wiki/Type_system" title="Type system">type system</a>, OCaml eliminates many of the type-related <a href="/wiki/Run-time_type_information" title="Run-time type information">runtime</a> problems associated with <a href="/wiki/Type_system" title="Type system">dynamically typed</a> languages. Also, OCaml's type-inferring compiler greatly reduces the need for the manual type annotations that are required in most statically typed languages. For example, the <a href="/wiki/Data_type" title="Data type">data types</a> of variables and the <a href="/wiki/Type_signature" title="Type signature">signatures</a> of functions usually need not be declared explicitly, as they do in languages like <a href="/wiki/Java_(programming_language)" title="Java (programming language)">Java</a> and <a href="/wiki/C_Sharp_(programming_language)" title="C Sharp (programming language)">C#</a>, because they can be <a href="/wiki/Type_inference" title="Type inference">inferred</a> from the operators and other functions that are applied to the variables and other values in the code. Effective use of OCaml's type system can require some sophistication on the part of a programmer, but this discipline is rewarded with reliable, high-performance software. </p><p>OCaml is perhaps most distinguished from other languages with origins in academia by its emphasis on performance. Its static type system prevents runtime type mismatches and thus obviates runtime type and safety checks that burden the performance of dynamically typed languages, while still guaranteeing runtime safety, except when <a href="/wiki/Array_bounds_checking" class="mw-redirect" title="Array bounds checking">array bounds checking</a> is turned off or when some type-unsafe features like <a href="/wiki/Serialization" title="Serialization">serialization</a> are used. These are rare enough that avoiding them is quite possible in practice. </p><p>Aside from type-checking overhead, <a href="/wiki/Functional_programming" title="Functional programming">functional programming</a> languages are, in general, challenging to compile to efficient machine language code, due to issues such as the <a href="/wiki/Funarg_problem" title="Funarg problem">funarg problem</a>. Along with standard loop, register, and instruction optimizations, OCaml's <a href="/wiki/Optimizing_compiler" title="Optimizing compiler">optimizing compiler</a> employs <a href="/wiki/Static_program_analysis" title="Static program analysis">static program analysis</a> methods to optimize value <a href="/wiki/Boxing_(computer_science)" class="mw-redirect" title="Boxing (computer science)">boxing</a> and <a href="/wiki/Closure_(computer_science)" class="mw-redirect" title="Closure (computer science)">closure</a> allocation, helping to maximize the performance of the resulting code even if it makes extensive use of functional programming constructs. </p><p><a href="/wiki/Xavier_Leroy" title="Xavier Leroy">Xavier Leroy</a> has stated that "OCaml delivers at least 50% of the performance of a decent C compiler",<sup id="cite_ref-LWN_8-0" class="reference"><a href="#cite_note-LWN-8"><span class="cite-bracket">&#91;</span>8<span class="cite-bracket">&#93;</span></a></sup> although a direct comparison is impossible. Some functions in the OCaml standard library are implemented with faster algorithms than equivalent functions in the standard libraries of other languages. For example, the implementation of set union in the OCaml standard library in theory is asymptotically faster than the equivalent function in the standard libraries of imperative languages (e.g., C++, Java) because the OCaml implementation can exploit the <a href="/wiki/Immutability" class="mw-redirect" title="Immutability">immutability</a> of sets to reuse parts of input sets in the output (see <a href="/wiki/Persistent_data_structure" title="Persistent data structure">persistent data structure</a>). </p> <div class="mw-heading mw-heading2"><h2 id="History">History</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=OCaml&amp;action=edit&amp;section=2" title="Edit section: History"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <figure class="mw-default-size" typeof="mw:File/Thumb"><a href="/wiki/File:Award_for_OCaml_at_POPL_2024.jpg" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/f/f5/Award_for_OCaml_at_POPL_2024.jpg/250px-Award_for_OCaml_at_POPL_2024.jpg" decoding="async" width="220" height="165" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/f/f5/Award_for_OCaml_at_POPL_2024.jpg/330px-Award_for_OCaml_at_POPL_2024.jpg 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/f/f5/Award_for_OCaml_at_POPL_2024.jpg/500px-Award_for_OCaml_at_POPL_2024.jpg 2x" data-file-width="4896" data-file-height="3672" /></a><figcaption>The OCaml development team receiving an award at <a href="/wiki/Symposium_on_Principles_of_Programming_Languages" title="Symposium on Principles of Programming Languages">Symposium on Principles of Programming Languages</a> (POPL) 2024</figcaption></figure> <div class="mw-heading mw-heading3"><h3 id="Development_of_ML_(Meta_Language)"><span id="Development_of_ML_.28Meta_Language.29"></span>Development of ML (Meta Language)</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=OCaml&amp;action=edit&amp;section=3" title="Edit section: Development of ML (Meta Language)"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Between the 1970s and 1980s, <a href="/wiki/Robin_Milner" title="Robin Milner">Robin Milner</a>, a British computer scientist and <a href="/wiki/Turing_Award" title="Turing Award">Turing Award</a> winner, worked at the <a href="/wiki/University_of_Edinburgh" title="University of Edinburgh">University of Edinburgh</a>'s <a href="/wiki/Laboratory_for_Foundations_of_Computer_Science" title="Laboratory for Foundations of Computer Science">Laboratory for Foundations of Computer Science</a>.<sup id="cite_ref-9" class="reference"><a href="#cite_note-9"><span class="cite-bracket">&#91;</span>9<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-:0_10-0" class="reference"><a href="#cite_note-:0-10"><span class="cite-bracket">&#91;</span>10<span class="cite-bracket">&#93;</span></a></sup> Milner and others were working on <a href="/wiki/Automated_theorem_proving" title="Automated theorem proving">theorem provers</a>, which were historically developed in languages such as <a href="/wiki/Lisp_(programming_language)" title="Lisp (programming language)">Lisp</a>. Milner repeatedly ran into the issue that the theorem provers would attempt to claim a <a href="/wiki/Proof_(truth)" title="Proof (truth)">proof</a> was valid by putting non-proofs together.<sup id="cite_ref-:0_10-1" class="reference"><a href="#cite_note-:0-10"><span class="cite-bracket">&#91;</span>10<span class="cite-bracket">&#93;</span></a></sup> As a result, he went on to develop the <a href="/wiki/ML_(programming_language)" title="ML (programming language)">meta language</a> for his <a href="/wiki/Logic_for_Computable_Functions" title="Logic for Computable Functions">Logic for Computable Functions</a>, a language that would only allow the writer to construct valid proofs with its polymorphic type system.<sup id="cite_ref-:1_11-0" class="reference"><a href="#cite_note-:1-11"><span class="cite-bracket">&#91;</span>11<span class="cite-bracket">&#93;</span></a></sup> ML was turned into a <a href="/wiki/Compiler" title="Compiler">compiler</a> to simplify using LCF on different machines, and, by the 1980s, was turned into a complete system of its own.<sup id="cite_ref-:1_11-1" class="reference"><a href="#cite_note-:1-11"><span class="cite-bracket">&#91;</span>11<span class="cite-bracket">&#93;</span></a></sup> ML would eventually serve as a basis for the creation of OCaml. </p><p>In the early 1980s, there were some developments that prompted <a href="/wiki/French_Institute_for_Research_in_Computer_Science_and_Automation" title="French Institute for Research in Computer Science and Automation">INRIA</a>'s Formel team to become interested in the ML language. <a href="/wiki/Luca_Cardelli" title="Luca Cardelli">Luca Cardelli</a>, a research professor at <a href="/wiki/University_of_Oxford" title="University of Oxford">University of Oxford</a>, used his <i>functional abstract machine</i> to develop a faster implementation of ML, and Robin Milner proposed a new definition of ML to avoid divergence between various implementations. Simultaneously, Pierre-Louis Curien, a senior researcher at <a href="/wiki/Paris_Diderot_University" title="Paris Diderot University">Paris Diderot University</a>, developed a calculus of categorical combinators and linked it to <a href="/wiki/Lambda_calculus" title="Lambda calculus">lambda calculus</a>, which led to the definition of the <i><a href="/wiki/Categorical_abstract_machine" title="Categorical abstract machine">categorical abstract machine</a></i> (CAM). Guy Cousineau, a researcher at Paris Diderot University, recognized that this could be applied as a compiling method for ML.<sup id="cite_ref-:2_12-0" class="reference"><a href="#cite_note-:2-12"><span class="cite-bracket">&#91;</span>12<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading3"><h3 id="First_implementation">First implementation</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=OCaml&amp;action=edit&amp;section=4" title="Edit section: First implementation"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="/wiki/Caml" title="Caml">Caml</a> was initially designed and developed by INRIA's Formel team headed by <a href="/wiki/G%C3%A9rard_Huet" title="Gérard Huet">Gérard Huet</a>. The first implementation of Caml was created in 1987 and was further developed until 1992. Though it was spearheaded by Ascánder Suárez, <a href="/w/index.php?title=Pierre_Weis_(computer_scientist)&amp;action=edit&amp;redlink=1" class="new" title="Pierre Weis (computer scientist) (page does not exist)">Pierre Weis</a> and <a href="/w/index.php?title=Michel_Mauny_(computer_science)&amp;action=edit&amp;redlink=1" class="new" title="Michel Mauny (computer science) (page does not exist)">Michel Mauny</a> carried on with development after he left in 1988.<sup id="cite_ref-:2_12-1" class="reference"><a href="#cite_note-:2-12"><span class="cite-bracket">&#91;</span>12<span class="cite-bracket">&#93;</span></a></sup> </p><p>Guy Cousineau is quoted recalling that his experience with programming language implementation was initially very limited, and that there were multiple inadequacies for which he is responsible. Despite this, he believes that "Ascander, Pierre and Michel did quite a nice piece of work.”<sup id="cite_ref-:2_12-2" class="reference"><a href="#cite_note-:2-12"><span class="cite-bracket">&#91;</span>12<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading3"><h3 id="Caml_Light">Caml Light</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=OCaml&amp;action=edit&amp;section=5" title="Edit section: Caml Light"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Between 1990 and 1991, <a href="/wiki/Xavier_Leroy" title="Xavier Leroy">Xavier Leroy</a> designed a new implementation of Caml based on a <a href="/wiki/Bytecode_interpreter" class="mw-redirect" title="Bytecode interpreter">bytecode interpreter</a> written in <a href="/wiki/C_(programming_language)" title="C (programming language)">C</a>. In addition to this, <a href="/wiki/Damien_Doligez" title="Damien Doligez">Damien Doligez</a> wrote a memory management system, also known as a sequential <a href="/wiki/Garbage_collection_(computer_science)" title="Garbage collection (computer science)">garbage collector</a>, for this implementation.<sup id="cite_ref-:1_11-2" class="reference"><a href="#cite_note-:1-11"><span class="cite-bracket">&#91;</span>11<span class="cite-bracket">&#93;</span></a></sup> This new implementation, known as <a href="/wiki/Caml_Light" class="mw-redirect" title="Caml Light">Caml Light</a>, replaced the old Caml implementation and ran on small desktop machines.<sup id="cite_ref-:2_12-3" class="reference"><a href="#cite_note-:2-12"><span class="cite-bracket">&#91;</span>12<span class="cite-bracket">&#93;</span></a></sup> In the following years, libraries such as Michel Mauny's syntax manipulation tools appeared and helped promote the use of Caml in educational and research teams.<sup id="cite_ref-:1_11-3" class="reference"><a href="#cite_note-:1-11"><span class="cite-bracket">&#91;</span>11<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading3"><h3 id="Caml_Special_Light">Caml Special Light</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=OCaml&amp;action=edit&amp;section=6" title="Edit section: Caml Special Light"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>In 1995, Xavier Leroy released Caml Special Light, which was an improved version of Caml.<sup id="cite_ref-:2_12-4" class="reference"><a href="#cite_note-:2-12"><span class="cite-bracket">&#91;</span>12<span class="cite-bracket">&#93;</span></a></sup> An optimizing <a href="/wiki/Native_code" class="mw-redirect" title="Native code">native-code</a> compiler was added to the bytecode compiler, which greatly increased performance to comparable levels with mainstream languages such as <a href="/wiki/C%2B%2B" title="C++">C++</a>.<sup id="cite_ref-:1_11-4" class="reference"><a href="#cite_note-:1-11"><span class="cite-bracket">&#91;</span>11<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-:2_12-5" class="reference"><a href="#cite_note-:2-12"><span class="cite-bracket">&#91;</span>12<span class="cite-bracket">&#93;</span></a></sup> Also, Leroy designed a high-level module system inspired by the module system of Standard ML which provided powerful facilities for abstraction and parameterization and made larger-scale programs easier to build.<sup id="cite_ref-:1_11-5" class="reference"><a href="#cite_note-:1-11"><span class="cite-bracket">&#91;</span>11<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading3"><h3 id="Objective_Caml">Objective Caml</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=OCaml&amp;action=edit&amp;section=7" title="Edit section: Objective Caml"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Didier Rémy and Jérôme Vouillon designed an expressive <a href="/wiki/Type_system" title="Type system">type system</a> for objects and classes, which was integrated within Caml Special Light. This led to the emergence of the Objective Caml language, first released in 1996 and subsequently renamed to OCaml in 2011. This object system notably supported many prevalent object-oriented idioms in a statically type-safe way, while those same idioms caused unsoundness or required runtime checks in languages such as C++ or <a href="/wiki/Java_(programming_language)" title="Java (programming language)">Java</a>. In 2000, Jacques Garrigue extended Objective Caml with multiple new features such as polymorphic methods, variants, and labeled and optional arguments.<sup id="cite_ref-:1_11-6" class="reference"><a href="#cite_note-:1-11"><span class="cite-bracket">&#91;</span>11<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-:2_12-6" class="reference"><a href="#cite_note-:2-12"><span class="cite-bracket">&#91;</span>12<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading3"><h3 id="Ongoing_development">Ongoing development</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=OCaml&amp;action=edit&amp;section=8" title="Edit section: Ongoing development"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Language improvements have been incrementally added for the last two decades to support the growing commercial and academic codebases in OCaml.<sup id="cite_ref-:1_11-7" class="reference"><a href="#cite_note-:1-11"><span class="cite-bracket">&#91;</span>11<span class="cite-bracket">&#93;</span></a></sup> The OCaml 4.0 release in 2012 added Generalized Algebraic Data Types (GADTs) and first-class modules to increase the flexibility of the language.<sup id="cite_ref-:1_11-8" class="reference"><a href="#cite_note-:1-11"><span class="cite-bracket">&#91;</span>11<span class="cite-bracket">&#93;</span></a></sup> The OCaml 5.0.0 release in 2022<sup id="cite_ref-13" class="reference"><a href="#cite_note-13"><span class="cite-bracket">&#91;</span>13<span class="cite-bracket">&#93;</span></a></sup> is a complete rewrite of the language runtime, removing the <a href="/wiki/Global_interpreter_lock" title="Global interpreter lock">global GC lock</a> and adding <a href="/wiki/Effect_system" title="Effect system">effect handlers</a> via <a href="/wiki/Delimited_continuations" class="mw-redirect" title="Delimited continuations">delimited continuations</a>. These changes enable support for <a href="/wiki/Parallel_programming_model#Shared_memory" title="Parallel programming model">shared-memory parallelism</a> and <a href="/w/index.php?title=Color-blind_concurrency&amp;action=edit&amp;redlink=1" class="new" title="Color-blind concurrency (page does not exist)">color-blind concurrency</a>, respectively. </p><p>OCaml's development continued within the Cristal team at INRIA until 2005, when it was succeeded by the Gallium team.<sup id="cite_ref-14" class="reference"><a href="#cite_note-14"><span class="cite-bracket">&#91;</span>14<span class="cite-bracket">&#93;</span></a></sup> Subsequently, Gallium was succeeded by the Cambium team in 2019.<sup id="cite_ref-15" class="reference"><a href="#cite_note-15"><span class="cite-bracket">&#91;</span>15<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-16" class="reference"><a href="#cite_note-16"><span class="cite-bracket">&#91;</span>16<span class="cite-bracket">&#93;</span></a></sup> As of 2023, there are 23 core developers of the compiler distribution from a variety of organizations<sup id="cite_ref-17" class="reference"><a href="#cite_note-17"><span class="cite-bracket">&#91;</span>17<span class="cite-bracket">&#93;</span></a></sup> and 41 developers for the broader OCaml tooling and packaging ecosystem.<sup id="cite_ref-18" class="reference"><a href="#cite_note-18"><span class="cite-bracket">&#91;</span>18<span class="cite-bracket">&#93;</span></a></sup> In 2023, the OCaml compiler was recognised with <a href="/wiki/SIGPLAN" title="SIGPLAN">ACM SIGPLAN's Programming Languages Software Award</a>. </p> <div class="mw-heading mw-heading2"><h2 id="Features">Features</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=OCaml&amp;action=edit&amp;section=9" title="Edit section: Features"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>OCaml features a <a href="/wiki/Semantic_analysis_(computer_science)" class="mw-redirect" title="Semantic analysis (computer science)">static</a> <a href="/wiki/Type_system" title="Type system">type system</a>, <a href="/wiki/Type_inference" title="Type inference">type inference</a>, <a href="/wiki/Parametric_polymorphism" title="Parametric polymorphism">parametric polymorphism</a>, <a href="/wiki/Tail_recursion" class="mw-redirect" title="Tail recursion">tail recursion</a>, <a href="/wiki/Pattern_matching" title="Pattern matching">pattern matching</a>, first class lexical <a href="/wiki/Closure_(computer_science)" class="mw-redirect" title="Closure (computer science)">closures</a>, <a href="/wiki/Function_object#Other_meanings" title="Function object">functors (parametric modules)</a>, <a href="/wiki/Exception_handling" title="Exception handling">exception handling</a>, <a href="/wiki/Effect_system" title="Effect system">effect handling</a>, and incremental generational <a href="/wiki/Garbage_collection_(computer_science)" title="Garbage collection (computer science)">automatic garbage collection</a>. </p><p>OCaml is notable for extending ML-style type inference to an object system in a general-purpose language. This permits <a href="/wiki/Structural_subtyping" class="mw-redirect" title="Structural subtyping">structural subtyping</a>, where object types are compatible if their method signatures are compatible, regardless of their declared <a href="/wiki/Inheritance_(object-oriented_programming)" title="Inheritance (object-oriented programming)">inheritance</a> (an unusual feature in statically typed languages). </p><p>A <a href="/wiki/Foreign_function_interface" title="Foreign function interface">foreign function interface</a> for <a href="/wiki/Linker_(computing)" title="Linker (computing)">linking</a> to <a href="/wiki/C_(programming_language)" title="C (programming language)">C</a> primitives is provided, including language support for efficient numerical <a href="/wiki/Array_data_structure" class="mw-redirect" title="Array data structure">arrays</a> in formats compatible with both C and <a href="/wiki/Fortran" title="Fortran">Fortran</a>. OCaml also supports creating libraries of OCaml functions that can be linked to a <i>main</i> program in C, so that an OCaml library can be distributed to C programmers who have no knowledge or installation of OCaml. </p><p>Although OCaml does not have a macro system as an indivisible part of the language (<a href="/wiki/Metaprogramming" title="Metaprogramming">metaprogramming</a>), i.e. built-in support for <a href="/wiki/Preprocessor" title="Preprocessor">preprocessing</a>, the <a rel="nofollow" class="external text" href="https://ocaml.org/docs/metaprogramming">OCaml platform does officially support a library for writing such preprocessors</a>. These can be of two types: one that works at the source code level (as in C), and one that works on the <a href="/wiki/Abstract_syntax_tree" title="Abstract syntax tree">Abstract Syntax Tree</a> level. The latter, which is called PPX, acronym for Pre-Processor eXtension, is the recommended one. </p><p>The OCaml distribution contains: </p> <ul><li><a href="/wiki/Lexical_analysis" title="Lexical analysis">Lexical analysis</a> and <a href="/wiki/Parsing" title="Parsing">parsing</a> tools called <i>ocamllex</i> and <i>ocamlyacc</i></li> <li><a href="/wiki/Debugger" title="Debugger">Debugger</a> that supports stepping backwards to investigate errors</li> <li><a href="/wiki/Documentation_generator" title="Documentation generator">Documentation generator</a></li> <li><a href="/wiki/Profiler_(computer_science)" class="mw-redirect" title="Profiler (computer science)">Profiler</a> – to measure performance</li> <li>Many general-purpose <a href="/wiki/Library_(computing)" title="Library (computing)">libraries</a></li></ul> <p>The native code compiler is available for many platforms, including <a href="/wiki/Unix" title="Unix">Unix</a>, <a href="/wiki/Microsoft_Windows" title="Microsoft Windows">Microsoft Windows</a>, and <a href="/wiki/Apple_Inc." title="Apple Inc.">Apple</a> <a href="/wiki/MacOS" title="MacOS">macOS</a>. Portability is achieved through native <a href="/wiki/Code_generation_(compiler)" title="Code generation (compiler)">code generation</a> support for major architectures: </p> <ul><li><a href="/wiki/X86-64" title="X86-64">X86-64</a> (AMD64), <a href="/wiki/RISC-V" title="RISC-V">RISC-V</a>, and <a href="/wiki/ARM64" class="mw-redirect" title="ARM64">ARM64</a> (in OCaml 5.0.0 and higher)<sup id="cite_ref-19" class="reference"><a href="#cite_note-19"><span class="cite-bracket">&#91;</span>19<span class="cite-bracket">&#93;</span></a></sup></li> <li><a href="/wiki/IBM_Z" title="IBM Z">IBM Z</a> (before OCaml 5.0.0, and back in OCaml 5.1.0)</li> <li><a href="/wiki/Power_ISA" title="Power ISA">Power</a> (before OCaml 5.0.0, and due to reappear in OCaml 5.2.0)</li> <li><a href="/wiki/IA-32" title="IA-32">IA-32</a> and <a href="/wiki/ARM_architecture" class="mw-redirect" title="ARM architecture">ARM</a> (before OCaml 5.0.0)</li> <li><a href="/wiki/SPARC" title="SPARC">SPARC</a> (before OCaml 4.06.0)</li> <li><a href="/wiki/DEC_Alpha" title="DEC Alpha">DEC Alpha</a>, <a href="/wiki/HPPA" class="mw-redirect" title="HPPA">HPPA</a>, <a href="/wiki/IA64" class="mw-redirect" title="IA64">IA64</a> and <a href="/wiki/MIPS_architecture" title="MIPS architecture">MIPS</a> (before OCaml 4.00.0)</li></ul> <p>The <a href="/wiki/Bytecode" title="Bytecode">bytecode</a> <a href="/wiki/Compiler" title="Compiler">compiler</a> supports operation on any 32- or 64-bit architecture when native code generation is not available, requiring only a C compiler. </p><p>OCaml bytecode and native code programs can be written in a <a href="/wiki/Thread_(computer_science)" class="mw-redirect" title="Thread (computer science)">multithreaded</a> style, with <a href="/wiki/Preemption_(computing)" title="Preemption (computing)">preemptive</a> context switching. OCaml <a href="/wiki/Thread_(computing)" title="Thread (computing)">threads</a> in the same domain<sup id="cite_ref-20" class="reference"><a href="#cite_note-20"><span class="cite-bracket">&#91;</span>20<span class="cite-bracket">&#93;</span></a></sup> execute by <a href="/wiki/Time-sharing" title="Time-sharing">time sharing</a> only. However, an OCaml program can contain several domains. </p> <div class="mw-heading mw-heading2"><h2 id="Code_examples">Code examples</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=OCaml&amp;action=edit&amp;section=10" title="Edit section: Code examples"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <style data-mw-deduplicate="TemplateStyles:r1251242444">.mw-parser-output .ambox{border:1px solid #a2a9b1;border-left:10px solid #36c;background-color:#fbfbfb;box-sizing:border-box}.mw-parser-output .ambox+link+.ambox,.mw-parser-output .ambox+link+style+.ambox,.mw-parser-output .ambox+link+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+style+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+link+.ambox{margin-top:-1px}html body.mediawiki .mw-parser-output .ambox.mbox-small-left{margin:4px 1em 4px 0;overflow:hidden;width:238px;border-collapse:collapse;font-size:88%;line-height:1.25em}.mw-parser-output .ambox-speedy{border-left:10px solid #b32424;background-color:#fee7e6}.mw-parser-output .ambox-delete{border-left:10px solid #b32424}.mw-parser-output .ambox-content{border-left:10px solid #f28500}.mw-parser-output .ambox-style{border-left:10px solid #fc3}.mw-parser-output .ambox-move{border-left:10px solid #9932cc}.mw-parser-output .ambox-protection{border-left:10px solid #a2a9b1}.mw-parser-output .ambox .mbox-text{border:none;padding:0.25em 0.5em;width:100%}.mw-parser-output .ambox .mbox-image{border:none;padding:2px 0 2px 0.5em;text-align:center}.mw-parser-output .ambox .mbox-imageright{border:none;padding:2px 0.5em 2px 0;text-align:center}.mw-parser-output .ambox .mbox-empty-cell{border:none;padding:0;width:1px}.mw-parser-output .ambox .mbox-image-div{width:52px}@media(min-width:720px){.mw-parser-output .ambox{margin:0 10%}}@media print{body.ns-0 .mw-parser-output .ambox{display:none!important}}</style><table class="box-One_source plainlinks metadata ambox ambox-content ambox-one_source" role="presentation"><tbody><tr><td class="mbox-image"><div class="mbox-image-div"><span typeof="mw:File"><a href="/wiki/File:Question_book-new.svg" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/en/thumb/9/99/Question_book-new.svg/50px-Question_book-new.svg.png" decoding="async" width="50" height="39" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/en/thumb/9/99/Question_book-new.svg/75px-Question_book-new.svg.png 1.5x, //upload.wikimedia.org/wikipedia/en/thumb/9/99/Question_book-new.svg/100px-Question_book-new.svg.png 2x" data-file-width="512" data-file-height="399" /></a></span></div></td><td class="mbox-text"><div class="mbox-text-span">This article <b>relies largely or entirely on a <a href="/wiki/Wikipedia:Articles_with_a_single_source" title="Wikipedia:Articles with a single source">single source</a></b>.<span class="hide-when-compact"> Relevant discussion may be found on the <a href="/wiki/Talk:OCaml" title="Talk:OCaml">talk page</a>. Please help <a class="external text" href="https://en.wikipedia.org/w/index.php?title=OCaml&amp;action=edit">improve this article</a> by <a href="/wiki/Help:Referencing_for_beginners" title="Help:Referencing for beginners">introducing citations to additional sources</a>.<br /><small><span class="plainlinks"><i>Find sources:</i>&#160;<a rel="nofollow" class="external text" href="https://www.google.com/search?as_eq=wikipedia&amp;q=%22OCaml%22">"OCaml"</a>&#160;–&#160;<a rel="nofollow" class="external text" href="https://www.google.com/search?tbm=nws&amp;q=%22OCaml%22+-wikipedia&amp;tbs=ar:1">news</a>&#160;<b>·</b> <a rel="nofollow" class="external text" href="https://www.google.com/search?&amp;q=%22OCaml%22&amp;tbs=bkt:s&amp;tbm=bks">newspapers</a>&#160;<b>·</b> <a rel="nofollow" class="external text" href="https://www.google.com/search?tbs=bks:1&amp;q=%22OCaml%22+-wikipedia">books</a>&#160;<b>·</b> <a rel="nofollow" class="external text" href="https://scholar.google.com/scholar?q=%22OCaml%22">scholar</a>&#160;<b>·</b> <a rel="nofollow" class="external text" href="https://www.jstor.org/action/doBasicSearch?Query=%22OCaml%22&amp;acc=on&amp;wc=on">JSTOR</a></span></small></span> <span class="date-container"><i>(<span class="date">January 2024</span>)</i></span></div></td></tr></tbody></table> <p>Snippets of OCaml code are most easily studied by entering them into the <i>top-level <a href="/wiki/Read%E2%80%93eval%E2%80%93print_loop" title="Read–eval–print loop">REPL</a></i>. This is an interactive OCaml session that prints the inferred types of resulting or defined expressions.<sup id="cite_ref-21" class="reference"><a href="#cite_note-21"><span class="cite-bracket">&#91;</span>21<span class="cite-bracket">&#93;</span></a></sup> The OCaml top-level is started by simply executing the OCaml program: </p> <div class="mw-highlight mw-highlight-lang-console mw-content-ltr" dir="ltr"><pre><span></span><span class="gp">$ </span>ocaml <span class="go"> Objective Caml version 3.09.0</span> <span class="gp">#</span> </pre></div> <p>Code can then be entered at the "#" prompt. For example, to calculate 1+2*3: </p> <div class="mw-highlight mw-highlight-lang-console mw-content-ltr" dir="ltr"><pre><span></span><span class="gp"># </span><span class="m">1</span><span class="w"> </span>+<span class="w"> </span><span class="m">2</span><span class="w"> </span>*<span class="w"> </span><span class="m">3</span><span class="p">;;</span> <span class="go">-&#160;: int = 7</span> </pre></div> <p>OCaml infers the type of the expression to be "int" (a <a href="/wiki/Word_(computer_architecture)" title="Word (computer architecture)">machine-precision</a> <a href="/wiki/Integer_(computer_science)" title="Integer (computer science)">integer</a>) and gives the result "7". </p> <div class="mw-heading mw-heading3"><h3 id="Hello_World">Hello World</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=OCaml&amp;action=edit&amp;section=11" title="Edit section: Hello World"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The following program "hello.ml": </p> <div class="mw-highlight mw-highlight-lang-ocaml mw-content-ltr" dir="ltr"><pre><span></span><span class="n">print_endline</span> <span class="s2">&quot;Hello World!&quot;</span> </pre></div> <p>can be compiled into a bytecode executable: </p> <pre>$ ocamlc hello.ml -o hello </pre> <p>or compiled into an optimized native-code executable: </p> <pre>$ ocamlopt hello.ml -o hello </pre> <p>and executed: </p> <div class="mw-highlight mw-highlight-lang-console mw-content-ltr" dir="ltr"><pre><span></span><span class="gp">$ </span>./hello <span class="go">Hello World!</span> <span class="gp">$</span> </pre></div> <p>The first argument to ocamlc, "hello.ml", specifies the source file to compile and the "-o hello" flag specifies the output file.<sup id="cite_ref-22" class="reference"><a href="#cite_note-22"><span class="cite-bracket">&#91;</span>22<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading3"><h3 id="Option">Option</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=OCaml&amp;action=edit&amp;section=12" title="Edit section: Option"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div><p> The <code>option</code> type constructor in OCaml, similar to the <code>Maybe</code> type in <a href="/wiki/Haskell" title="Haskell">Haskell</a>, augments a given data type to either return <code>Some</code> value of the given data type, or to return <code>None</code>.<sup id="cite_ref-23" class="reference"><a href="#cite_note-23"><span class="cite-bracket">&#91;</span>23<span class="cite-bracket">&#93;</span></a></sup> This is used to express that a value might or might not be present.</p><div class="mw-highlight mw-highlight-lang-ocaml mw-content-ltr" dir="ltr"><pre><span></span><span class="o">#</span> <span class="nc">Some</span> <span class="mi">42</span><span class="o">;;</span> <span class="o">-</span> <span class="o">:</span> <span class="kt">int</span> <span class="n">option</span> <span class="o">=</span> <span class="nc">Some</span> <span class="mi">42</span> <span class="o">#</span> <span class="nc">None</span><span class="o">;;</span> <span class="o">-</span> <span class="o">:</span> <span class="k">&#39;</span><span class="n">a</span> <span class="n">option</span> <span class="o">=</span> <span class="nc">None</span> </pre></div><p>This is an example of a function that either extracts an int from an option, if there is one inside, and converts it into a <a href="/wiki/String_(computer_science)" title="String (computer science)">string</a>, or if not, returns an empty string:</p><div class="mw-highlight mw-highlight-lang-ocaml mw-content-ltr" dir="ltr"><pre><span></span><span class="k">let</span> <span class="n">extract</span> <span class="n">o</span> <span class="o">=</span> <span class="k">match</span> <span class="n">o</span> <span class="k">with</span> <span class="o">|</span> <span class="nc">Some</span> <span class="n">i</span> <span class="o">-&gt;</span> <span class="n">string_of_int</span> <span class="n">i</span> <span class="o">|</span> <span class="nc">None</span> <span class="o">-&gt;</span> <span class="s2">&quot;&quot;</span><span class="o">;;</span> </pre></div><div class="mw-highlight mw-highlight-lang-ocaml mw-content-ltr" dir="ltr"><pre><span></span><span class="o">#</span> <span class="n">extract</span> <span class="o">(</span><span class="nc">Some</span> <span class="mi">42</span><span class="o">);;</span> <span class="o">-</span> <span class="o">:</span> <span class="kt">string</span> <span class="o">=</span> <span class="s2">&quot;42&quot;</span> <span class="o">#</span> <span class="n">extract</span> <span class="nc">None</span><span class="o">;;</span> <span class="o">-</span> <span class="o">:</span> <span class="kt">string</span> <span class="o">=</span> <span class="s2">&quot;&quot;</span> </pre></div> <div class="mw-heading mw-heading3"><h3 id="Summing_a_list_of_integers">Summing a list of integers</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=OCaml&amp;action=edit&amp;section=13" title="Edit section: Summing a list of integers"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Lists are one of the fundamental datatypes in OCaml. The following code example defines a <a href="/wiki/Recursion_(computer_science)" title="Recursion (computer science)">recursive</a> function <i>sum</i> that accepts one argument, <i>integers</i>, which is supposed to be a list of integers. Note the keyword <code>rec</code> which denotes that the function is recursive. The function recursively iterates over the given list of integers and provides a sum of the elements. The <i>match</i> statement has similarities to <a href="/wiki/C_(programming_language)" title="C (programming language)">C</a>'s <a href="/wiki/Switch_statement" title="Switch statement">switch</a> element, though it is far more general. </p> <div class="mw-highlight mw-highlight-lang-ocaml mw-content-ltr" dir="ltr"><pre><span></span><span class="k">let</span> <span class="k">rec</span> <span class="n">sum</span> <span class="n">integers</span> <span class="o">=</span> <span class="c">(* Keyword rec means &#39;recursive&#39;. *)</span> <span class="k">match</span> <span class="n">integers</span> <span class="k">with</span> <span class="o">|</span> <span class="bp">[]</span> <span class="o">-&gt;</span> <span class="mi">0</span> <span class="c">(* Yield 0 if integers is the empty </span> <span class="c"> list []. *)</span> <span class="o">|</span> <span class="n">first</span> <span class="o">::</span> <span class="n">rest</span> <span class="o">-&gt;</span> <span class="n">first</span> <span class="o">+</span> <span class="n">sum</span> <span class="n">rest</span><span class="o">;;</span> <span class="c">(* Recursive call if integers is a non-</span> <span class="c"> empty list; first is the first </span> <span class="c"> element of the list, and rest is a </span> <span class="c"> list of the rest of the elements, </span> <span class="c"> possibly []. *)</span> </pre></div> <div class="mw-highlight mw-highlight-lang-ocaml mw-content-ltr" dir="ltr"><pre><span></span> <span class="o">#</span> <span class="n">sum</span> <span class="o">[</span><span class="mi">1</span><span class="o">;</span><span class="mi">2</span><span class="o">;</span><span class="mi">3</span><span class="o">;</span><span class="mi">4</span><span class="o">;</span><span class="mi">5</span><span class="o">];;</span> <span class="o">-</span> <span class="o">:</span> <span class="kt">int</span> <span class="o">=</span> <span class="mi">15</span> </pre></div> <p>Another way is to use standard <a href="/wiki/Fold_function" class="mw-redirect" title="Fold function">fold function</a> that works with lists. </p> <div class="mw-highlight mw-highlight-lang-ocaml mw-content-ltr" dir="ltr"><pre><span></span><span class="k">let</span> <span class="n">sum</span> <span class="n">integers</span> <span class="o">=</span> <span class="nn">List</span><span class="p">.</span><span class="n">fold_left</span> <span class="o">(</span><span class="k">fun</span> <span class="n">accumulator</span> <span class="n">x</span> <span class="o">-&gt;</span> <span class="n">accumulator</span> <span class="o">+</span> <span class="n">x</span><span class="o">)</span> <span class="mi">0</span> <span class="n">integers</span><span class="o">;;</span> </pre></div> <div class="mw-highlight mw-highlight-lang-ocaml mw-content-ltr" dir="ltr"><pre><span></span> <span class="o">#</span> <span class="n">sum</span> <span class="o">[</span><span class="mi">1</span><span class="o">;</span><span class="mi">2</span><span class="o">;</span><span class="mi">3</span><span class="o">;</span><span class="mi">4</span><span class="o">;</span><span class="mi">5</span><span class="o">];;</span> <span class="o">-</span> <span class="o">:</span> <span class="kt">int</span> <span class="o">=</span> <span class="mi">15</span> </pre></div> <p>Since the <a href="/wiki/Anonymous_function" title="Anonymous function">anonymous function</a> is simply the application of the + operator, this can be shortened to: </p> <div class="mw-highlight mw-highlight-lang-ocaml mw-content-ltr" dir="ltr"><pre><span></span><span class="k">let</span> <span class="n">sum</span> <span class="n">integers</span> <span class="o">=</span> <span class="nn">List</span><span class="p">.</span><span class="n">fold_left</span> <span class="o">(+)</span> <span class="mi">0</span> <span class="n">integers</span> </pre></div> <p>Furthermore, one can omit the list argument by making use of a <a href="/wiki/Partial_application" title="Partial application">partial application</a>: </p> <div class="mw-highlight mw-highlight-lang-ocaml mw-content-ltr" dir="ltr"><pre><span></span><span class="k">let</span> <span class="n">sum</span> <span class="o">=</span> <span class="nn">List</span><span class="p">.</span><span class="n">fold_left</span> <span class="o">(+)</span> <span class="mi">0</span> </pre></div> <div class="mw-heading mw-heading3"><h3 id="Quicksort">Quicksort</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=OCaml&amp;action=edit&amp;section=14" title="Edit section: Quicksort"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>OCaml lends itself to concisely expressing recursive algorithms. The following code example implements an algorithm similar to <a href="/wiki/Quicksort" title="Quicksort">quicksort</a> that sorts a list in increasing order. </p> <div class="mw-highlight mw-highlight-lang-ocaml mw-content-ltr" dir="ltr"><pre><span></span> <span class="k">let</span> <span class="k">rec</span> <span class="n">qsort</span> <span class="o">=</span> <span class="k">function</span> <span class="o">|</span> <span class="bp">[]</span> <span class="o">-&gt;</span> <span class="bp">[]</span> <span class="o">|</span> <span class="n">pivot</span> <span class="o">::</span> <span class="n">rest</span> <span class="o">-&gt;</span> <span class="k">let</span> <span class="n">is_less</span> <span class="n">x</span> <span class="o">=</span> <span class="n">x</span> <span class="o">&lt;</span> <span class="n">pivot</span> <span class="k">in</span> <span class="k">let</span> <span class="n">left</span><span class="o">,</span> <span class="n">right</span> <span class="o">=</span> <span class="nn">List</span><span class="p">.</span><span class="n">partition</span> <span class="n">is_less</span> <span class="n">rest</span> <span class="k">in</span> <span class="n">qsort</span> <span class="n">left</span> <span class="o">@</span> <span class="o">[</span><span class="n">pivot</span><span class="o">]</span> <span class="o">@</span> <span class="n">qsort</span> <span class="n">right</span> </pre></div> <p>Or using partial application of the &gt;= operator. </p> <div class="mw-highlight mw-highlight-lang-ocaml mw-content-ltr" dir="ltr"><pre><span></span> <span class="k">let</span> <span class="k">rec</span> <span class="n">qsort</span> <span class="o">=</span> <span class="k">function</span> <span class="o">|</span> <span class="bp">[]</span> <span class="o">-&gt;</span> <span class="bp">[]</span> <span class="o">|</span> <span class="n">pivot</span> <span class="o">::</span> <span class="n">rest</span> <span class="o">-&gt;</span> <span class="k">let</span> <span class="n">is_less</span> <span class="o">=</span> <span class="o">(&gt;=)</span> <span class="n">pivot</span> <span class="k">in</span> <span class="k">let</span> <span class="n">left</span><span class="o">,</span> <span class="n">right</span> <span class="o">=</span> <span class="nn">List</span><span class="p">.</span><span class="n">partition</span> <span class="n">is_less</span> <span class="n">rest</span> <span class="k">in</span> <span class="n">qsort</span> <span class="n">left</span> <span class="o">@</span> <span class="o">[</span><span class="n">pivot</span><span class="o">]</span> <span class="o">@</span> <span class="n">qsort</span> <span class="n">right</span> </pre></div> <div class="mw-heading mw-heading3"><h3 id="Birthday_problem">Birthday problem</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=OCaml&amp;action=edit&amp;section=15" title="Edit section: Birthday problem"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The following program calculates the smallest number of people in a room for whom the probability of completely unique birthdays is less than 50% (the <a href="/wiki/Birthday_problem" title="Birthday problem">birthday problem</a>, where for 1 person the probability is 365/365 (or 100%), for 2 it is 364/365, for 3 it is 364/365 × 363/365, etc.) (answer = 23). </p> <div class="mw-highlight mw-highlight-lang-ocaml mw-content-ltr" dir="ltr"><pre><span></span><span class="k">let</span> <span class="n">year_size</span> <span class="o">=</span> <span class="mi">365</span><span class="o">.</span> <span class="k">let</span> <span class="k">rec</span> <span class="n">birthday_paradox</span> <span class="n">prob</span> <span class="n">people</span> <span class="o">=</span> <span class="k">let</span> <span class="n">prob</span> <span class="o">=</span> <span class="o">(</span><span class="n">year_size</span> <span class="o">-.</span> <span class="kt">float</span> <span class="n">people</span><span class="o">)</span> <span class="o">/.</span> <span class="n">year_size</span> <span class="o">*.</span> <span class="n">prob</span> <span class="k">in</span> <span class="k">if</span> <span class="n">prob</span> <span class="o">&lt;</span> <span class="mi">0</span><span class="o">.</span><span class="mi">5</span> <span class="k">then</span> <span class="nn">Printf</span><span class="p">.</span><span class="n">printf</span> <span class="s2">&quot;answer = %d</span><span class="se">\n</span><span class="s2">&quot;</span> <span class="o">(</span><span class="n">people</span><span class="o">+</span><span class="mi">1</span><span class="o">)</span> <span class="k">else</span> <span class="n">birthday_paradox</span> <span class="n">prob</span> <span class="o">(</span><span class="n">people</span><span class="o">+</span><span class="mi">1</span><span class="o">)</span> <span class="o">;;</span> <span class="n">birthday_paradox</span> <span class="mi">1</span><span class="o">.</span><span class="mi">0</span> <span class="mi">1</span> </pre></div> <div class="mw-heading mw-heading3"><h3 id="Church_numerals">Church numerals</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=OCaml&amp;action=edit&amp;section=16" title="Edit section: Church numerals"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The following code defines a <a href="/wiki/Church_encoding" title="Church encoding">Church encoding</a> of <a href="/wiki/Natural_number" title="Natural number">natural numbers</a>, with successor (succ) and addition (add). A Church numeral <code class="mw-highlight mw-highlight-lang-ocaml mw-content-ltr" dir="ltr"><span class="n">n</span></code> is a <a href="/wiki/Higher-order_function" title="Higher-order function">higher-order function</a> that accepts a function <code class="mw-highlight mw-highlight-lang-ocaml mw-content-ltr" dir="ltr"><span class="n">f</span></code> and a value <code class="mw-highlight mw-highlight-lang-ocaml mw-content-ltr" dir="ltr"><span class="n">x</span></code> and applies <code class="mw-highlight mw-highlight-lang-ocaml mw-content-ltr" dir="ltr"><span class="n">f</span></code> to <code class="mw-highlight mw-highlight-lang-ocaml mw-content-ltr" dir="ltr"><span class="n">x</span></code> exactly <code class="mw-highlight mw-highlight-lang-ocaml mw-content-ltr" dir="ltr"><span class="n">n</span></code> times. To convert a Church numeral from a functional value to a string, we pass it a function that prepends the string <code class="mw-highlight mw-highlight-lang-ocaml mw-content-ltr" dir="ltr"><span class="s2">&quot;S&quot;</span></code> to its input and the constant string <code class="mw-highlight mw-highlight-lang-ocaml mw-content-ltr" dir="ltr"><span class="s2">&quot;0&quot;</span></code>. </p> <div class="mw-highlight mw-highlight-lang-ocaml mw-content-ltr" dir="ltr"><pre><span></span><span class="k">let</span> <span class="n">zero</span> <span class="n">f</span> <span class="n">x</span> <span class="o">=</span> <span class="n">x</span> <span class="k">let</span> <span class="n">succ</span> <span class="n">n</span> <span class="n">f</span> <span class="n">x</span> <span class="o">=</span> <span class="n">f</span> <span class="o">(</span><span class="n">n</span> <span class="n">f</span> <span class="n">x</span><span class="o">)</span> <span class="k">let</span> <span class="n">one</span> <span class="o">=</span> <span class="n">succ</span> <span class="n">zero</span> <span class="k">let</span> <span class="n">two</span> <span class="o">=</span> <span class="n">succ</span> <span class="o">(</span><span class="n">succ</span> <span class="n">zero</span><span class="o">)</span> <span class="k">let</span> <span class="n">add</span> <span class="n">n1</span> <span class="n">n2</span> <span class="n">f</span> <span class="n">x</span> <span class="o">=</span> <span class="n">n1</span> <span class="n">f</span> <span class="o">(</span><span class="n">n2</span> <span class="n">f</span> <span class="n">x</span><span class="o">)</span> <span class="k">let</span> <span class="n">to_string</span> <span class="n">n</span> <span class="o">=</span> <span class="n">n</span> <span class="o">(</span><span class="k">fun</span> <span class="n">k</span> <span class="o">-&gt;</span> <span class="s2">&quot;S&quot;</span> <span class="o">^</span> <span class="n">k</span><span class="o">)</span> <span class="s2">&quot;0&quot;</span> <span class="k">let</span> <span class="o">_</span> <span class="o">=</span> <span class="n">to_string</span> <span class="o">(</span><span class="n">add</span> <span class="o">(</span><span class="n">succ</span> <span class="n">two</span><span class="o">)</span> <span class="n">two</span><span class="o">)</span> </pre></div> <div class="mw-heading mw-heading3"><h3 id="Arbitrary-precision_factorial_function_(libraries)"><span id="Arbitrary-precision_factorial_function_.28libraries.29"></span>Arbitrary-precision factorial function (libraries)</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=OCaml&amp;action=edit&amp;section=17" title="Edit section: Arbitrary-precision factorial function (libraries)"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>A variety of libraries are directly accessible from OCaml. For example, OCaml has a built-in library for <a href="/wiki/Arbitrary-precision_arithmetic" title="Arbitrary-precision arithmetic">arbitrary-precision arithmetic</a>. As the factorial function grows very rapidly, it quickly overflows machine-precision numbers (typically 32- or 64-bits). Thus, factorial is a suitable candidate for arbitrary-precision arithmetic. </p><p>In OCaml, the Num module (now superseded by the ZArith module) provides arbitrary-precision arithmetic and can be loaded into a running top-level using: </p> <div class="mw-highlight mw-highlight-lang-ocaml mw-content-ltr" dir="ltr"><pre><span></span><span class="o">#</span> <span class="o">#</span><span class="n">use</span> <span class="s2">&quot;topfind&quot;</span><span class="o">;;</span> <span class="o">#</span> <span class="o">#</span><span class="n">require</span> <span class="s2">&quot;num&quot;</span><span class="o">;;</span> <span class="o">#</span> <span class="k">open</span> <span class="nc">Num</span><span class="o">;;</span> </pre></div> <p>The factorial function may then be written using the arbitrary-precision numeric operators <style data-mw-deduplicate="TemplateStyles:r886049734">.mw-parser-output .monospaced{font-family:monospace,monospace}</style><span class="monospaced">=/</span>, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">*/</span> and <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734" /><span class="monospaced">-/</span>&#160;: </p> <div class="mw-highlight mw-highlight-lang-ocaml mw-content-ltr" dir="ltr"><pre><span></span><span class="o">#</span> <span class="k">let</span> <span class="k">rec</span> <span class="n">fact</span> <span class="n">n</span> <span class="o">=</span> <span class="k">if</span> <span class="n">n</span> <span class="o">=/</span> <span class="nc">Int</span> <span class="mi">0</span> <span class="k">then</span> <span class="nc">Int</span> <span class="mi">1</span> <span class="k">else</span> <span class="n">n</span> <span class="o">*/</span> <span class="n">fact</span><span class="o">(</span><span class="n">n</span> <span class="o">-/</span> <span class="nc">Int</span> <span class="mi">1</span><span class="o">);;</span> <span class="k">val</span> <span class="n">fact</span> <span class="o">:</span> <span class="nn">Num</span><span class="p">.</span><span class="n">num</span> <span class="o">-&gt;</span> <span class="nn">Num</span><span class="p">.</span><span class="n">num</span> <span class="o">=</span> <span class="o">&lt;</span><span class="k">fun</span><span class="o">&gt;</span> </pre></div> <p>This function can compute much larger factorials, such as 120!: </p> <div class="mw-highlight mw-highlight-lang-ocaml mw-content-ltr" dir="ltr"><pre><span></span><span class="o">#</span> <span class="n">string_of_num</span> <span class="o">(</span><span class="n">fact</span> <span class="o">(</span><span class="nc">Int</span> <span class="mi">120</span><span class="o">));;</span> <span class="o">-</span> <span class="o">:</span> <span class="kt">string</span> <span class="o">=</span> <span class="s2">&quot;6689502913449127057588118054090372586752746333138029810295671352301633</span> <span class="s2">55724496298936687416527198498130815763789321409055253440858940812185989</span> <span class="s2">8481114389650005964960521256960000000000000000000000000000&quot;</span> </pre></div> <div class="mw-heading mw-heading3"><h3 id="Triangle_(graphics)"><span id="Triangle_.28graphics.29"></span>Triangle (graphics)</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=OCaml&amp;action=edit&amp;section=18" title="Edit section: Triangle (graphics)"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The following program renders a rotating triangle in 2D using <a href="/wiki/OpenGL" title="OpenGL">OpenGL</a>: </p> <div class="mw-highlight mw-highlight-lang-ocaml mw-content-ltr" dir="ltr"><pre><span></span><span class="k">let</span> <span class="bp">()</span> <span class="o">=</span> <span class="n">ignore</span> <span class="o">(</span><span class="nn">Glut</span><span class="p">.</span><span class="n">init</span> <span class="nn">Sys</span><span class="p">.</span><span class="n">argv</span><span class="o">);</span> <span class="nn">Glut</span><span class="p">.</span><span class="n">initDisplayMode</span> <span class="o">~</span><span class="n">double_buffer</span><span class="o">:</span><span class="bp">true</span> <span class="bp">()</span><span class="o">;</span> <span class="n">ignore</span> <span class="o">(</span><span class="nn">Glut</span><span class="p">.</span><span class="n">createWindow</span> <span class="o">~</span><span class="n">title</span><span class="o">:</span><span class="s2">&quot;OpenGL Demo&quot;</span><span class="o">);</span> <span class="k">let</span> <span class="n">angle</span> <span class="n">t</span> <span class="o">=</span> <span class="mi">10</span><span class="o">.</span> <span class="o">*.</span> <span class="n">t</span> <span class="o">*.</span> <span class="n">t</span> <span class="k">in</span> <span class="k">let</span> <span class="n">render</span> <span class="bp">()</span> <span class="o">=</span> <span class="nn">GlClear</span><span class="p">.</span><span class="n">clear</span> <span class="o">[</span> <span class="o">`</span><span class="n">color</span> <span class="o">];</span> <span class="nn">GlMat</span><span class="p">.</span><span class="n">load_identity</span> <span class="bp">()</span><span class="o">;</span> <span class="nn">GlMat</span><span class="p">.</span><span class="n">rotate</span> <span class="o">~</span><span class="n">angle</span><span class="o">:</span> <span class="o">(</span><span class="n">angle</span> <span class="o">(</span><span class="nn">Sys</span><span class="p">.</span><span class="n">time</span> <span class="bp">()</span><span class="o">))</span> <span class="o">~</span><span class="n">z</span><span class="o">:</span><span class="mi">1</span><span class="o">.</span> <span class="bp">()</span><span class="o">;</span> <span class="nn">GlDraw</span><span class="p">.</span><span class="n">begins</span> <span class="o">`</span><span class="n">triangles</span><span class="o">;</span> <span class="nn">List</span><span class="p">.</span><span class="n">iter</span> <span class="nn">GlDraw</span><span class="p">.</span><span class="n">vertex2</span> <span class="o">[-</span><span class="mi">1</span><span class="o">.,</span> <span class="o">-</span><span class="mi">1</span><span class="o">.;</span> <span class="mi">0</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="o">-</span><span class="mi">1</span><span class="o">.];</span> <span class="nn">GlDraw</span><span class="p">.</span><span class="n">ends</span> <span class="bp">()</span><span class="o">;</span> <span class="nn">Glut</span><span class="p">.</span><span class="n">swapBuffers</span> <span class="bp">()</span> <span class="k">in</span> <span class="nn">GlMat</span><span class="p">.</span><span class="n">mode</span> <span class="o">`</span><span class="n">modelview</span><span class="o">;</span> <span class="nn">Glut</span><span class="p">.</span><span class="n">displayFunc</span> <span class="o">~</span><span class="n">cb</span><span class="o">:</span><span class="n">render</span><span class="o">;</span> <span class="nn">Glut</span><span class="p">.</span><span class="n">idleFunc</span> <span class="o">~</span><span class="n">cb</span><span class="o">:(</span><span class="nc">Some</span> <span class="nn">Glut</span><span class="p">.</span><span class="n">postRedisplay</span><span class="o">);</span> <span class="nn">Glut</span><span class="p">.</span><span class="n">mainLoop</span> <span class="bp">()</span> </pre></div> <p>The LablGL bindings to OpenGL are required. The program may then be compiled to bytecode with: </p> <pre>$ ocamlc -I +lablGL lablglut.cma lablgl.cma simple.ml -o simple </pre> <p>or to nativecode with: </p> <pre>$ ocamlopt -I +lablGL lablglut.cmxa lablgl.cmxa simple.ml -o simple </pre> <p>or, more simply, using the ocamlfind build command </p> <pre>$ ocamlfind opt simple.ml -package lablgl.glut -linkpkg -o simple </pre> <p>and run: </p> <pre>$ ./simple </pre> <p>Far more sophisticated, high-performance 2D and 3D graphical programs can be developed in OCaml. Thanks to the use of OpenGL and OCaml, the resulting programs can be cross-platform, compiling without any changes on many major platforms. </p> <div class="mw-heading mw-heading3"><h3 id="Fibonacci_sequence">Fibonacci sequence</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=OCaml&amp;action=edit&amp;section=19" title="Edit section: Fibonacci sequence"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The following code calculates the <a href="/wiki/Fibonacci_number" class="mw-redirect" title="Fibonacci number">Fibonacci sequence</a> of a number <i>n</i> inputted. It uses <a href="/wiki/Tail_recursion" class="mw-redirect" title="Tail recursion">tail recursion</a> and pattern matching. </p> <div class="mw-highlight mw-highlight-lang-ocaml mw-content-ltr" dir="ltr"><pre><span></span><span class="k">let</span> <span class="n">fib</span> <span class="n">n</span> <span class="o">=</span> <span class="k">let</span> <span class="k">rec</span> <span class="n">fib_aux</span> <span class="n">m</span> <span class="n">a</span> <span class="n">b</span> <span class="o">=</span> <span class="k">match</span> <span class="n">m</span> <span class="k">with</span> <span class="o">|</span> <span class="mi">0</span> <span class="o">-&gt;</span> <span class="n">a</span> <span class="o">|</span> <span class="o">_</span> <span class="o">-&gt;</span> <span class="n">fib_aux</span> <span class="o">(</span><span class="n">m</span> <span class="o">-</span> <span class="mi">1</span><span class="o">)</span> <span class="n">b</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="k">in</span> <span class="n">fib_aux</span> <span class="n">n</span> <span class="mi">0</span> <span class="mi">1</span> </pre></div> <div class="mw-heading mw-heading3"><h3 id="Higher-order_functions">Higher-order functions</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=OCaml&amp;action=edit&amp;section=20" title="Edit section: Higher-order functions"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Functions may take functions as input and return functions as result. For example, applying <i>twice</i> to a function <i>f</i> yields a function that applies <i>f</i> two times to its argument. </p> <div class="mw-highlight mw-highlight-lang-ocaml mw-content-ltr" dir="ltr"><pre><span></span><span class="k">let</span> <span class="n">twice</span> <span class="o">(</span><span class="n">f</span> <span class="o">:</span> <span class="k">&#39;</span><span class="n">a</span> <span class="o">-&gt;</span> <span class="k">&#39;</span><span class="n">a</span><span class="o">)</span> <span class="o">=</span> <span class="k">fun</span> <span class="o">(</span><span class="n">x</span> <span class="o">:</span> <span class="k">&#39;</span><span class="n">a</span><span class="o">)</span> <span class="o">-&gt;</span> <span class="n">f</span> <span class="o">(</span><span class="n">f</span> <span class="n">x</span><span class="o">);;</span> <span class="k">let</span> <span class="n">inc</span> <span class="o">(</span><span class="n">x</span> <span class="o">:</span> <span class="kt">int</span><span class="o">)</span> <span class="o">:</span> <span class="kt">int</span> <span class="o">=</span> <span class="n">x</span> <span class="o">+</span> <span class="mi">1</span><span class="o">;;</span> <span class="k">let</span> <span class="n">add2</span> <span class="o">=</span> <span class="n">twice</span> <span class="n">inc</span><span class="o">;;</span> <span class="k">let</span> <span class="n">inc_str</span> <span class="o">(</span><span class="n">x</span> <span class="o">:</span> <span class="kt">string</span><span class="o">)</span> <span class="o">:</span> <span class="kt">string</span> <span class="o">=</span> <span class="n">x</span> <span class="o">^</span> <span class="s2">&quot; &quot;</span> <span class="o">^</span> <span class="n">x</span><span class="o">;;</span> <span class="k">let</span> <span class="n">add_str</span> <span class="o">=</span> <span class="n">twice</span><span class="o">(</span><span class="n">inc_str</span><span class="o">);;</span> </pre></div> <div class="mw-highlight mw-highlight-lang-ocaml mw-content-ltr" dir="ltr"><pre><span></span><span class="hll"> <span class="o">#</span> <span class="n">add2</span> <span class="mi">98</span><span class="o">;;</span> </span> <span class="o">-</span> <span class="o">:</span> <span class="kt">int</span> <span class="o">=</span> <span class="mi">100</span> <span class="hll"> <span class="o">#</span> <span class="n">add_str</span> <span class="s2">&quot;Test&quot;</span><span class="o">;;</span> </span> <span class="o">-</span> <span class="o">:</span> <span class="kt">string</span> <span class="o">=</span> <span class="s2">&quot;Test Test Test Test&quot;</span> </pre></div> <p>The function <i>twice</i> uses a type variable<i> 'a</i> to indicate that it can be applied to any function <i>f</i> mapping from a type<i> 'a</i> to itself, rather than only to <i>int-&gt;int</i> functions. In particular, <i>twice</i> can even be applied to itself. </p> <div class="mw-highlight mw-highlight-lang-ocaml mw-content-ltr" dir="ltr"><pre><span></span><span class="hll"> <span class="o">#</span> <span class="k">let</span> <span class="n">fourtimes</span> <span class="n">f</span> <span class="o">=</span> <span class="o">(</span><span class="n">twice</span> <span class="n">twice</span><span class="o">)</span> <span class="n">f</span><span class="o">;;</span> </span> <span class="k">val</span> <span class="n">fourtimes</span> <span class="o">:</span> <span class="o">(</span><span class="k">&#39;</span><span class="n">a</span> <span class="o">-&gt;</span> <span class="k">&#39;</span><span class="n">a</span><span class="o">)</span> <span class="o">-&gt;</span> <span class="k">&#39;</span><span class="n">a</span> <span class="o">-&gt;</span> <span class="k">&#39;</span><span class="n">a</span> <span class="o">=</span> <span class="o">&lt;</span><span class="k">fun</span><span class="o">&gt;</span> <span class="hll"> <span class="o">#</span> <span class="k">let</span> <span class="n">add4</span> <span class="o">=</span> <span class="n">fourtimes</span> <span class="n">inc</span><span class="o">;;</span> </span> <span class="k">val</span> <span class="n">add4</span> <span class="o">:</span> <span class="kt">int</span> <span class="o">-&gt;</span> <span class="kt">int</span> <span class="o">=</span> <span class="o">&lt;</span><span class="k">fun</span><span class="o">&gt;</span> <span class="hll"> <span class="o">#</span> <span class="n">add4</span> <span class="mi">98</span><span class="o">;;</span> </span> <span class="o">-</span> <span class="o">:</span> <span class="kt">int</span> <span class="o">=</span> <span class="mi">102</span> </pre></div> <div class="mw-heading mw-heading2"><h2 id="Derived_languages">Derived languages</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=OCaml&amp;action=edit&amp;section=21" title="Edit section: Derived languages"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="mw-heading mw-heading3"><h3 id="MetaOCaml">MetaOCaml</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=OCaml&amp;action=edit&amp;section=22" title="Edit section: MetaOCaml"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>MetaOCaml<sup id="cite_ref-Meta_24-0" class="reference"><a href="#cite_note-Meta-24"><span class="cite-bracket">&#91;</span>24<span class="cite-bracket">&#93;</span></a></sup> is a <a href="/wiki/Multi-stage_programming" title="Multi-stage programming">multi-stage programming</a> extension of OCaml enabling incremental compiling of new <a href="/wiki/Machine_code" title="Machine code">machine code</a> during runtime. Under some circumstances, significant <a href="/wiki/Speedup" title="Speedup">speedups</a> are possible using <a href="/wiki/Multi-stage_programming" title="Multi-stage programming">multistage programming</a>, because more detailed information about the data to process is available at runtime than at the regular compile time, so the incremental compiler can optimize away many cases of condition checking, etc. </p><p>As an example: if at compile time it is known that some <a href="/wiki/Exponentiation" title="Exponentiation">power function</a> <code class="mw-highlight mw-highlight-lang-ocaml mw-content-ltr" dir="ltr"><span class="n">x</span> <span class="o">-&gt;</span> <span class="n">x</span><span class="o">^</span><span class="n">n</span></code> is needed often, but the value of <code class="mw-highlight mw-highlight-lang-ocaml mw-content-ltr" dir="ltr"><span class="n">n</span></code> is known only at <a href="/wiki/Runtime_system" title="Runtime system">runtime</a>, a two-stage power function can be used in MetaOCaml: </p> <div class="mw-highlight mw-highlight-lang-ocaml mw-content-ltr" dir="ltr"><pre><span></span><span class="k">let</span> <span class="k">rec</span> <span class="n">power</span> <span class="n">n</span> <span class="n">x</span> <span class="o">=</span> <span class="k">if</span> <span class="n">n</span> <span class="o">=</span> <span class="mi">0</span> <span class="k">then</span> <span class="o">.&lt;</span><span class="mi">1</span><span class="o">&gt;.</span> <span class="k">else</span> <span class="k">if</span> <span class="n">even</span> <span class="n">n</span> <span class="k">then</span> <span class="n">sqr</span> <span class="o">(</span><span class="n">power</span> <span class="o">(</span><span class="n">n</span><span class="o">/</span><span class="mi">2</span><span class="o">)</span> <span class="n">x</span><span class="o">)</span> <span class="k">else</span> <span class="o">.&lt;.~</span><span class="n">x</span> <span class="o">*.</span> <span class="o">.~(</span><span class="n">power</span> <span class="o">(</span><span class="n">n</span> <span class="o">-</span> <span class="mi">1</span><span class="o">)</span> <span class="n">x</span><span class="o">)&gt;.</span> </pre></div> <p>As soon as <code class="mw-highlight mw-highlight-lang-ocaml mw-content-ltr" dir="ltr"><span class="n">n</span></code> is known at runtime, a specialized and very fast power function can be created: </p> <div class="mw-highlight mw-highlight-lang-ocaml mw-content-ltr" dir="ltr"><pre><span></span><span class="o">.&lt;</span><span class="k">fun</span> <span class="n">x</span> <span class="o">-&gt;</span> <span class="o">.~(</span><span class="n">power</span> <span class="mi">5</span> <span class="o">.&lt;</span><span class="n">x</span><span class="o">&gt;.)&gt;.</span> </pre></div> <p>The result is: </p> <div class="mw-highlight mw-highlight-lang-ocaml mw-content-ltr" dir="ltr"><pre><span></span><span class="k">fun</span> <span class="n">x_1</span> <span class="o">-&gt;</span> <span class="o">(</span><span class="n">x_1</span> <span class="o">*</span> <span class="k">let</span> <span class="n">y_3</span> <span class="o">=</span> <span class="k">let</span> <span class="n">y_2</span> <span class="o">=</span> <span class="o">(</span><span class="n">x_1</span> <span class="o">*</span> <span class="mi">1</span><span class="o">)</span> <span class="k">in</span> <span class="o">(</span><span class="n">y_2</span> <span class="o">*</span> <span class="n">y_2</span><span class="o">)</span> <span class="k">in</span> <span class="o">(</span><span class="n">y_3</span> <span class="o">*</span> <span class="n">y_3</span><span class="o">))</span> </pre></div> <p>The new function is automatically compiled. </p> <div class="mw-heading mw-heading3"><h3 id="Other_derived_languages">Other derived languages</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=OCaml&amp;action=edit&amp;section=23" title="Edit section: Other derived languages"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a href="/wiki/F_Sharp_(programming_language)" title="F Sharp (programming language)">F#</a> is a <a href="/wiki/.NET" title=".NET">.NET</a> framework language based on OCaml.</li> <li><a href="/wiki/JoCaml" title="JoCaml">JoCaml</a> integrates constructions for developing <a href="/wiki/Concurrent_computing" title="Concurrent computing">concurrent</a> and <a href="/wiki/Distributed_computing" title="Distributed computing">distributed programs</a>.</li> <li><a href="/wiki/Reason_(programming_language)" title="Reason (programming language)">Reason</a> is an alternative OCaml <a href="/wiki/Syntax_(programming_languages)" title="Syntax (programming languages)">syntax</a> and <a href="/wiki/Toolchain" title="Toolchain">toolchain</a> for OCaml created at <a href="/wiki/Facebook" title="Facebook">Facebook</a>, which can compile to both native code and <a href="/wiki/JavaScript" title="JavaScript">JavaScript</a>.</li></ul> <div class="mw-heading mw-heading2"><h2 id="Software_written_in_OCaml">Software written in OCaml</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=OCaml&amp;action=edit&amp;section=24" title="Edit section: Software written in OCaml"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li>Ahrefs, an <a href="/wiki/Search_engine_optimization" title="Search engine optimization">SEO</a> software product</li> <li><a href="/wiki/Alt-Ergo" title="Alt-Ergo">Alt-Ergo</a>, a <a href="/wiki/Satisfiability_modulo_theories" title="Satisfiability modulo theories">SMT solver</a>.</li> <li><a href="/wiki/Astr%C3%A9e_(static_analysis)" title="Astrée (static analysis)">Astrée</a>, a <a href="/wiki/Static_program_analysis" title="Static program analysis">static analyzer</a></li> <li><a href="/w/index.php?title=Be_Sport&amp;action=edit&amp;redlink=1" class="new" title="Be Sport (page does not exist)">Be Sport</a>, a <a href="/wiki/Social_networking_service" title="Social networking service">social network</a></li> <li><a href="/wiki/Coccinelle_(software)" title="Coccinelle (software)">Coccinelle</a>, a utility for <a href="/wiki/Program_transformation" title="Program transformation">transforming</a> the <a href="/wiki/Source_code" title="Source code">source code</a> of <a href="/wiki/C_(programming_language)" title="C (programming language)">C</a> programs.</li> <li><a href="/wiki/Coq_(software)" class="mw-redirect" title="Coq (software)">Coq</a>, a <a href="/wiki/Formal_proof" title="Formal proof">formal proof</a> <a href="/wiki/Management_system" title="Management system">management system</a>.</li> <li>Easycrypt, a <a href="/wiki/Programming_tool" title="Programming tool">toolset</a> for writing <a href="/wiki/Computer-assisted_proof" title="Computer-assisted proof">computer-aided proofs</a>.<sup id="cite_ref-25" class="reference"><a href="#cite_note-25"><span class="cite-bracket">&#91;</span>25<span class="cite-bracket">&#93;</span></a></sup></li> <li><a href="/wiki/F*_(programming_language)" title="F* (programming language)">F*</a>, a high-level, multi-paradigm, functional and object-oriented programming language intended for <a href="/wiki/Formal_verification" title="Formal verification">program verification</a>.</li> <li><a href="/wiki/FFTW" title="FFTW">FFTW</a>, a <a href="/wiki/Library_(computing)" title="Library (computing)">library</a> for computing <a href="/wiki/Discrete_Fourier_transform" title="Discrete Fourier transform">discrete Fourier transforms</a>. Several C routines have been generated by an OCaml program named <code class="mw-highlight mw-highlight-lang-ocaml mw-content-ltr" dir="ltr"><span class="n">genfft</span></code>.</li> <li>The web version of <a href="/wiki/Facebook_Messenger" class="mw-redirect" title="Facebook Messenger">Facebook Messenger</a>.<sup id="cite_ref-26" class="reference"><a href="#cite_note-26"><span class="cite-bracket">&#91;</span>26<span class="cite-bracket">&#93;</span></a></sup></li> <li>Flow, a <a href="/wiki/Static_program_analysis" title="Static program analysis">static analyzer</a> created at <a href="/wiki/Facebook" title="Facebook">Facebook</a> that infers and checks <a href="/wiki/Type_system#Static_type_checking" title="Type system">static types</a> for <a href="/wiki/JavaScript" title="JavaScript">JavaScript</a>.<sup id="cite_ref-27" class="reference"><a href="#cite_note-27"><span class="cite-bracket">&#91;</span>27<span class="cite-bracket">&#93;</span></a></sup></li> <li><a href="/w/index.php?title=Ocsigen&amp;action=edit&amp;redlink=1" class="new" title="Ocsigen (page does not exist)">Ocsigen</a>, a <a href="/wiki/Client%E2%80%93server_model" title="Client–server model">client server</a> Web and mobile development <a href="/wiki/Application_framework" title="Application framework">framework</a></li> <li><a href="/wiki/Owl_Scientific_Computing" title="Owl Scientific Computing">Owl Scientific Computing</a>, a dedicated system for scientific and engineering computing.</li> <li><a href="/wiki/Frama-C" title="Frama-C">Frama-C</a>, a framework for analyzing C programs.</li> <li><a href="/wiki/GeneWeb" title="GeneWeb">GeneWeb</a>, free and open-source multi-platform genealogy software.</li> <li>The <a href="/wiki/Hack_(programming_language)" title="Hack (programming language)">Hack</a> programming language compiler, created at Facebook, extending <a href="/wiki/PHP" title="PHP">PHP</a> with static types.</li> <li>The <a href="/wiki/Haxe" title="Haxe">Haxe</a> programming language compiler.</li> <li><a href="/wiki/HOL_Light" title="HOL Light">HOL Light</a>, a formal proof assistant.</li> <li>Infer, a static analyzer created at Facebook for <a href="/wiki/Java_(programming_language)" title="Java (programming language)">Java</a>, C, <a href="/wiki/C%2B%2B" title="C++">C++</a>, and <a href="/wiki/Objective-C" title="Objective-C">Objective-C</a>, used to detect bugs in <a href="/wiki/IOS" title="IOS">iOS</a> and <a href="/wiki/Android_(operating_system)" title="Android (operating system)">Android</a> apps.<sup id="cite_ref-28" class="reference"><a href="#cite_note-28"><span class="cite-bracket">&#91;</span>28<span class="cite-bracket">&#93;</span></a></sup></li> <li><a href="/wiki/Liquidsoap" title="Liquidsoap">Liquidsoap</a>, a <a href="/wiki/Scripting_language" title="Scripting language">scripting language</a> for generating multimedia streams.</li> <li><a href="/wiki/MirageOS" class="mw-redirect" title="MirageOS">MirageOS</a>, a <a href="/wiki/Unikernel" title="Unikernel">unikernel</a> programming framework written in pure OCaml.</li> <li><a href="/wiki/MLdonkey" class="mw-redirect" title="MLdonkey">MLdonkey</a>, a <a href="/wiki/Peer-to-peer_file_sharing" title="Peer-to-peer file sharing">peer-to-peer file sharing</a> application based on the <a href="/wiki/EDonkey_network" title="EDonkey network">EDonkey network</a>.</li> <li><a href="/wiki/Opa_(programming_language)" title="Opa (programming language)">Opa</a>, a free and open-source programming language for web development.</li> <li><a href="/wiki/Reason_(programming_language)" title="Reason (programming language)"> Reason / ReScript</a>, a general-purpose, high-level, multi-paradigm, functional and object-oriented programming language.</li> <li>The <a href="/wiki/Rust_(programming_language)" title="Rust (programming language)">Rust</a> compiler was <a href="/wiki/Bootstrapping_(compilers)" title="Bootstrapping (compilers)">initially implemented</a> in OCaml before becoming <a href="/wiki/Self-hosting_(compilers)" title="Self-hosting (compilers)">self-hosting</a>.</li> <li><a href="/wiki/Tezos" title="Tezos">Tezos</a>, a self-amending smart contract platform using XTZ as a native currency.</li> <li><a href="/wiki/Unison_(software)" title="Unison (software)">Unison</a>, a <a href="/wiki/File_synchronization" title="File synchronization">file synchronization</a> program to synchronize files between two directories.</li> <li>The reference interpreter for <a href="/wiki/WebAssembly" title="WebAssembly">WebAssembly</a>, a low-level <a href="/wiki/Bytecode" title="Bytecode">bytecode</a> intended for execution inside <a href="/wiki/Web_browser" title="Web browser">web browsers</a>.<sup id="cite_ref-29" class="reference"><a href="#cite_note-29"><span class="cite-bracket">&#91;</span>29<span class="cite-bracket">&#93;</span></a></sup></li> <li><a href="/wiki/Xen_Cloud_Platform" class="mw-redirect" title="Xen Cloud Platform">Xen Cloud Platform</a> (XCP), a <a href="/wiki/Turnkey" title="Turnkey">turnkey</a> <a href="/wiki/Virtualization" title="Virtualization">virtualization</a> solution for the <a href="/wiki/Xen" title="Xen">Xen</a> <a href="/wiki/Hypervisor" title="Hypervisor">hypervisor</a>.</li></ul> <div class="mw-heading mw-heading2"><h2 id="Users">Users</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=OCaml&amp;action=edit&amp;section=25" title="Edit section: Users"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>At least several dozen companies use OCaml to some degree.<sup id="cite_ref-ocaml.org-companies_30-0" class="reference"><a href="#cite_note-ocaml.org-companies-30"><span class="cite-bracket">&#91;</span>30<span class="cite-bracket">&#93;</span></a></sup> Notable examples include: </p> <ul><li><a href="/wiki/Bloomberg_L.P." title="Bloomberg L.P.">Bloomberg L.P.</a>, which created <a rel="nofollow" class="external text" href="https://bucklescript.github.io/">BuckleScript</a>, an OCaml compiler backend targeting JavaScript.<sup id="cite_ref-31" class="reference"><a href="#cite_note-31"><span class="cite-bracket">&#91;</span>31<span class="cite-bracket">&#93;</span></a></sup></li> <li><a href="/wiki/Citrix_Systems" title="Citrix Systems">Citrix Systems</a>, which uses OCaml in <a href="/wiki/Citrix_Systems#Networking_and_cloud" title="Citrix Systems">XenServer</a> (rebranded as Citrix Hypervisor during 2018).<sup id="cite_ref-32" class="reference"><a href="#cite_note-32"><span class="cite-bracket">&#91;</span>32<span class="cite-bracket">&#93;</span></a></sup></li> <li><a href="/wiki/Facebook" title="Facebook">Facebook</a>, which developed Flow,<sup id="cite_ref-33" class="reference"><a href="#cite_note-33"><span class="cite-bracket">&#91;</span>33<span class="cite-bracket">&#93;</span></a></sup> Hack, Infer, Pfff, and <a href="/wiki/Reason_(programming_language)" title="Reason (programming language)">ReasonML</a> in OCaml.</li> <li><a href="/wiki/Jane_Street_Capital" title="Jane Street Capital">Jane Street Capital</a>, a <a href="/wiki/Proprietary_trading" title="Proprietary trading">proprietary trading</a> firm, which adopted OCaml as its preferred language in its early days<sup id="cite_ref-34" class="reference"><a href="#cite_note-34"><span class="cite-bracket">&#91;</span>34<span class="cite-bracket">&#93;</span></a></sup> and continues to use it as of 2023.<sup id="cite_ref-35" class="reference"><a href="#cite_note-35"><span class="cite-bracket">&#91;</span>35<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-36" class="reference"><a href="#cite_note-36"><span class="cite-bracket">&#91;</span>36<span class="cite-bracket">&#93;</span></a></sup></li> <li><a href="/wiki/Docker_(software)" title="Docker (software)">Docker</a>, which uses OCaml in the desktop editions on <a href="/wiki/MacOS" title="MacOS">macOS</a> and <a href="/wiki/Windows" class="mw-redirect" title="Windows">Windows</a>.<sup id="cite_ref-37" class="reference"><a href="#cite_note-37"><span class="cite-bracket">&#91;</span>37<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-38" class="reference"><a href="#cite_note-38"><span class="cite-bracket">&#91;</span>38<span class="cite-bracket">&#93;</span></a></sup></li></ul> <p>In the context of Academic teaching and research, OCaml has a remarkable presence in computer science teaching programmes, both in universities and colleges. A list of educational resources and these teaching programmes can be found <a rel="nofollow" class="external text" href="https://ocaml.org/academic-users/institutions">ocaml.org</a>. </p> <div class="mw-heading mw-heading2"><h2 id="References">References</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=OCaml&amp;action=edit&amp;section=26" title="Edit section: References"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <style data-mw-deduplicate="TemplateStyles:r1239543626">.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}</style><div class="reflist"> <div class="mw-references-wrap mw-references-columns"><ol class="references"> <li id="cite_note-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-1">^</a></b></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("//upload.wikimedia.org/wikipedia/commons/6/65/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("//upload.wikimedia.org/wikipedia/commons/d/d6/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("//upload.wikimedia.org/wikipedia/commons/a/aa/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("//upload.wikimedia.org/wikipedia/commons/4/4c/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}</style><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://ocaml.org/learn/tutorials/modules.html">"Modules"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">22 February</span> 2020</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Modules&amp;rft_id=https%3A%2F%2Focaml.org%2Flearn%2Ftutorials%2Fmodules.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AOCaml" class="Z3988"></span></span> </li> <li id="cite_note-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-2">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFLeroy1996" class="citation web cs1"><a href="/wiki/Xavier_Leroy" title="Xavier Leroy">Leroy, Xavier</a> (1996). <a rel="nofollow" class="external text" href="https://sympa.inria.fr/sympa/arc/caml-list/1996-05/msg00003.html">"Objective Caml 1.00"</a>. caml-list mailing list.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Objective+Caml+1.00&amp;rft.pub=caml-list+mailing+list&amp;rft.date=1996&amp;rft.aulast=Leroy&amp;rft.aufirst=Xavier&amp;rft_id=https%3A%2F%2Fsympa.inria.fr%2Fsympa%2Farc%2Fcaml-list%2F1996-05%2Fmsg00003.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AOCaml" class="Z3988"></span></span> </li> <li id="cite_note-wikidata-34447fdd2960f8e7ad4f5ce6624650819a99db73-v18-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-wikidata-34447fdd2960f8e7ad4f5ce6624650819a99db73-v18_3-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite class="citation web cs1"> <a rel="nofollow" class="external text" href="https://ocaml.org/releases/5.3.0">https://ocaml.org/releases/5.3.0</a><span class="reference-accessdate">. Retrieved <span class="nowrap">9 January</span> 2025</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft_id=https%3A%2F%2Focaml.org%2Freleases%2F5.3.0&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AOCaml" class="Z3988"></span> <span class="cs1-visible-error citation-comment"><code class="cs1-code">{{<a href="/wiki/Template:Cite_web" title="Template:Cite web">cite web</a>}}</code>: </span><span class="cs1-visible-error citation-comment">Missing or empty <code class="cs1-code">&#124;title=</code> (<a href="/wiki/Help:CS1_errors#citation_missing_title" title="Help:CS1 errors">help</a>)</span></span> </li> <li id="cite_note-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-4">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://doc.rust-lang.org/reference/influences.html">"Influences - The Rust Reference"</a>. <i>The Rust Reference</i><span class="reference-accessdate">. Retrieved <span class="nowrap">31 December</span> 2023</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=The+Rust+Reference&amp;rft.atitle=Influences+-+The+Rust+Reference&amp;rft_id=https%3A%2F%2Fdoc.rust-lang.org%2Freference%2Finfluences.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AOCaml" class="Z3988"></span></span> </li> <li id="cite_note-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-5">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.irif.fr/~vouillon/">"Jérôme Vouillon"</a>. <i>www.irif.fr</i><span class="reference-accessdate">. Retrieved <span class="nowrap">14 June</span> 2024</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=www.irif.fr&amp;rft.atitle=J%C3%A9r%C3%B4me+Vouillon&amp;rft_id=https%3A%2F%2Fwww.irif.fr%2F~vouillon%2F&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AOCaml" class="Z3988"></span></span> </li> <li id="cite_note-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-6">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://pauillac.inria.fr/~remy/">"Didier Remy"</a>. <i>pauillac.inria.fr</i><span class="reference-accessdate">. Retrieved <span class="nowrap">14 June</span> 2024</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=pauillac.inria.fr&amp;rft.atitle=Didier+Remy&amp;rft_id=https%3A%2F%2Fpauillac.inria.fr%2F~remy%2F&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AOCaml" class="Z3988"></span></span> </li> <li id="cite_note-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-7">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://ocaml.org/learn/history.html">"A History of OCaml"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">24 December</span> 2016</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=A+History+of+OCaml&amp;rft_id=http%3A%2F%2Focaml.org%2Flearn%2Fhistory.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AOCaml" class="Z3988"></span></span> </li> <li id="cite_note-LWN-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-LWN_8-0">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="https://lwn.net/Articles/19378/">Linux Weekly News</a>.</span> </li> <li id="cite_note-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-9">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://amturing.acm.org/award_winners/milner_1569367.cfm">"A J Milner - A.M. Turing Award Laureate"</a>. <i>amturing.acm.org</i><span class="reference-accessdate">. Retrieved <span class="nowrap">6 October</span> 2022</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=amturing.acm.org&amp;rft.atitle=A+J+Milner+-+A.M.+Turing+Award+Laureate&amp;rft_id=https%3A%2F%2Famturing.acm.org%2Faward_winners%2Fmilner_1569367.cfm&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AOCaml" class="Z3988"></span></span> </li> <li id="cite_note-:0-10"><span class="mw-cite-backlink">^ <a href="#cite_ref-:0_10-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-:0_10-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFClarkson" class="citation web cs1">Clarkson, Michael; et&#160;al. <a rel="nofollow" class="external text" href="https://courses.cs.cornell.edu/cs3110/2021sp/textbook/intro/ocaml.html">"1.2. OCaml: Functional Programming in OCaml"</a>. <i>courses.cs.cornell.edu</i><span class="reference-accessdate">. Retrieved <span class="nowrap">6 October</span> 2022</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=courses.cs.cornell.edu&amp;rft.atitle=1.2.+OCaml%3A+Functional+Programming+in+OCaml&amp;rft.aulast=Clarkson&amp;rft.aufirst=Michael&amp;rft_id=https%3A%2F%2Fcourses.cs.cornell.edu%2Fcs3110%2F2021sp%2Ftextbook%2Fintro%2Focaml.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AOCaml" class="Z3988"></span></span> </li> <li id="cite_note-:1-11"><span class="mw-cite-backlink">^ <a href="#cite_ref-:1_11-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-:1_11-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-:1_11-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-:1_11-3"><sup><i><b>d</b></i></sup></a> <a href="#cite_ref-:1_11-4"><sup><i><b>e</b></i></sup></a> <a href="#cite_ref-:1_11-5"><sup><i><b>f</b></i></sup></a> <a href="#cite_ref-:1_11-6"><sup><i><b>g</b></i></sup></a> <a href="#cite_ref-:1_11-7"><sup><i><b>h</b></i></sup></a> <a href="#cite_ref-:1_11-8"><sup><i><b>i</b></i></sup></a></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://dev.realworldocaml.org/prologue.html#a-brief-history">"Prologue - Real World OCaml"</a>. <i>dev.realworldocaml.org</i><span class="reference-accessdate">. Retrieved <span class="nowrap">6 October</span> 2022</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=dev.realworldocaml.org&amp;rft.atitle=Prologue+-+Real+World+OCaml&amp;rft_id=https%3A%2F%2Fdev.realworldocaml.org%2Fprologue.html%23a-brief-history&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AOCaml" class="Z3988"></span></span> </li> <li id="cite_note-:2-12"><span class="mw-cite-backlink">^ <a href="#cite_ref-:2_12-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-:2_12-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-:2_12-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-:2_12-3"><sup><i><b>d</b></i></sup></a> <a href="#cite_ref-:2_12-4"><sup><i><b>e</b></i></sup></a> <a href="#cite_ref-:2_12-5"><sup><i><b>f</b></i></sup></a> <a href="#cite_ref-:2_12-6"><sup><i><b>g</b></i></sup></a></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://v2.ocaml.org/learn/history.html">"A History of OCaml – OCaml"</a>. <i>v2.ocaml.org</i><span class="reference-accessdate">. Retrieved <span class="nowrap">7 October</span> 2022</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=v2.ocaml.org&amp;rft.atitle=A+History+of+OCaml+%E2%80%93+OCaml&amp;rft_id=https%3A%2F%2Fv2.ocaml.org%2Flearn%2Fhistory.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AOCaml" class="Z3988"></span></span> </li> <li id="cite_note-13"><span class="mw-cite-backlink"><b><a href="#cite_ref-13">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://ocaml.org/news/ocaml-5.0">"Release of OCaml 5.0.0 OCaml Package"</a>. <i>OCaml</i><span class="reference-accessdate">. Retrieved <span class="nowrap">16 December</span> 2022</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=OCaml&amp;rft.atitle=Release+of+OCaml+5.0.0+OCaml+Package&amp;rft_id=https%3A%2F%2Focaml.org%2Fnews%2Focaml-5.0&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AOCaml" class="Z3988"></span></span> </li> <li id="cite_note-14"><span class="mw-cite-backlink"><b><a href="#cite_ref-14">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://cristal.inria.fr/">"Projet Cristal"</a>. <i>cristal.inria.fr</i><span class="reference-accessdate">. Retrieved <span class="nowrap">7 October</span> 2022</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=cristal.inria.fr&amp;rft.atitle=Projet+Cristal&amp;rft_id=http%3A%2F%2Fcristal.inria.fr%2F&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AOCaml" class="Z3988"></span></span> </li> <li id="cite_note-15"><span class="mw-cite-backlink"><b><a href="#cite_ref-15">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://gallium.inria.fr/">"Gallium team - Home"</a>. <i>gallium.inria.fr</i><span class="reference-accessdate">. Retrieved <span class="nowrap">7 October</span> 2022</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=gallium.inria.fr&amp;rft.atitle=Gallium+team+-+Home&amp;rft_id=http%3A%2F%2Fgallium.inria.fr%2F&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AOCaml" class="Z3988"></span></span> </li> <li id="cite_note-16"><span class="mw-cite-backlink"><b><a href="#cite_ref-16">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://cambium.inria.fr/">"Home"</a>. <i>cambium.inria.fr</i><span class="reference-accessdate">. Retrieved <span class="nowrap">7 October</span> 2022</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=cambium.inria.fr&amp;rft.atitle=Home&amp;rft_id=http%3A%2F%2Fcambium.inria.fr%2F&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AOCaml" class="Z3988"></span></span> </li> <li id="cite_note-17"><span class="mw-cite-backlink"><b><a href="#cite_ref-17">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://ocaml.org/governance/compiler">"OCaml compiler governance and membership"</a>. 2023.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=OCaml+compiler+governance+and+membership&amp;rft.date=2023&amp;rft_id=https%3A%2F%2Focaml.org%2Fgovernance%2Fcompiler&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AOCaml" class="Z3988"></span></span> </li> <li id="cite_note-18"><span class="mw-cite-backlink"><b><a href="#cite_ref-18">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://ocaml.org/governance">"OCaml governance and projects"</a>. 2023.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=OCaml+governance+and+projects&amp;rft.date=2023&amp;rft_id=https%3A%2F%2Focaml.org%2Fgovernance&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AOCaml" class="Z3988"></span></span> </li> <li id="cite_note-19"><span class="mw-cite-backlink"><b><a href="#cite_ref-19">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://github.com/ocaml/ocaml/tree/trunk/asmcomp">"ocaml/asmcomp at trunk · ocaml/ocaml · GitHub"</a>. <i>GitHub</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2 May</span> 2015</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=GitHub&amp;rft.atitle=ocaml%2Fasmcomp+at+trunk+%C2%B7+ocaml%2Focaml+%C2%B7+GitHub&amp;rft_id=https%3A%2F%2Fgithub.com%2Focaml%2Focaml%2Ftree%2Ftrunk%2Fasmcomp&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AOCaml" class="Z3988"></span></span> </li> <li id="cite_note-20"><span class="mw-cite-backlink"><b><a href="#cite_ref-20">^</a></b></span> <span class="reference-text">A domain is a unit of parallelism in OCaml, a domain usually corresponds to a CPU core</span> </li> <li id="cite_note-21"><span class="mw-cite-backlink"><b><a href="#cite_ref-21">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://ocaml.org/manual/toplevel.html">"OCaml - The toplevel system or REPL (ocaml)"</a>. <i>ocaml.org</i><span class="reference-accessdate">. Retrieved <span class="nowrap">17 May</span> 2021</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=ocaml.org&amp;rft.atitle=OCaml+-+The+toplevel+system+or+REPL+%28ocaml%29&amp;rft_id=https%3A%2F%2Focaml.org%2Fmanual%2Ftoplevel.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AOCaml" class="Z3988"></span></span> </li> <li id="cite_note-22"><span class="mw-cite-backlink"><b><a href="#cite_ref-22">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://caml.inria.fr/pub/docs/manual-ocaml/comp.html">"OCaml - Batch compilation (Ocamlc)"</a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=OCaml+-+Batch+compilation+%28Ocamlc%29&amp;rft_id=https%3A%2F%2Fcaml.inria.fr%2Fpub%2Fdocs%2Fmanual-ocaml%2Fcomp.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AOCaml" class="Z3988"></span></span> </li> <li id="cite_note-23"><span class="mw-cite-backlink"><b><a href="#cite_ref-23">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://cs3110.github.io/textbook/chapters/data/options.html">"3.7. Options — OCaml Programming: Correct + Efficient + Beautiful"</a>. <i>cs3110.github.io</i><span class="reference-accessdate">. Retrieved <span class="nowrap">7 October</span> 2022</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=cs3110.github.io&amp;rft.atitle=3.7.+Options+%E2%80%94+OCaml+Programming%3A+Correct+%2B+Efficient+%2B+Beautiful&amp;rft_id=https%3A%2F%2Fcs3110.github.io%2Ftextbook%2Fchapters%2Fdata%2Foptions.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AOCaml" class="Z3988"></span></span> </li> <li id="cite_note-Meta-24"><span class="mw-cite-backlink"><b><a href="#cite_ref-Meta_24-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFoleg-at-okmij.org" class="citation web cs1">oleg-at-okmij.org. <a rel="nofollow" class="external text" href="http://okmij.org/ftp/ML/MetaOCaml.html">"BER MetaOCaml"</a>. <i>okmij.org</i>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=okmij.org&amp;rft.atitle=BER+MetaOCaml&amp;rft.au=oleg-at-okmij.org&amp;rft_id=http%3A%2F%2Fokmij.org%2Fftp%2FML%2FMetaOCaml.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AOCaml" class="Z3988"></span></span> </li> <li id="cite_note-25"><span class="mw-cite-backlink"><b><a href="#cite_ref-25">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite class="citation cs2"><a rel="nofollow" class="external text" href="https://github.com/EasyCrypt/easycrypt"><i>EasyCrypt/easycrypt</i></a>, EasyCrypt, 5 July 2024<span class="reference-accessdate">, retrieved <span class="nowrap">5 July</span> 2024</span></cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=EasyCrypt%2Feasycrypt&amp;rft.pub=EasyCrypt&amp;rft.date=2024-07-05&amp;rft_id=https%3A%2F%2Fgithub.com%2FEasyCrypt%2Feasycrypt&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AOCaml" class="Z3988"></span></span> </li> <li id="cite_note-26"><span class="mw-cite-backlink"><b><a href="#cite_ref-26">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://reasonml.github.io/blog/2017/09/08/messenger-50-reason.html">"Messenger.com Now 50% Converted to Reason · Reason"</a>. <i>reasonml.github.io</i><span class="reference-accessdate">. Retrieved <span class="nowrap">27 February</span> 2018</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=reasonml.github.io&amp;rft.atitle=Messenger.com+Now+50%25+Converted+to+Reason+%C2%B7+Reason&amp;rft_id=https%3A%2F%2Freasonml.github.io%2Fblog%2F2017%2F09%2F08%2Fmessenger-50-reason.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AOCaml" class="Z3988"></span></span> </li> <li id="cite_note-27"><span class="mw-cite-backlink"><b><a href="#cite_ref-27">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20220408204727/https://flow.org/en/">"Flow: A Static Type Checker for JavaScript"</a>. <i>Flow</i>. Archived from <a rel="nofollow" class="external text" href="https://flow.org/en/">the original</a> on 8 April 2022<span class="reference-accessdate">. Retrieved <span class="nowrap">10 February</span> 2019</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=Flow&amp;rft.atitle=Flow%3A+A+Static+Type+Checker+for+JavaScript&amp;rft_id=https%3A%2F%2Fflow.org%2Fen%2F&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AOCaml" class="Z3988"></span></span> </li> <li id="cite_note-28"><span class="mw-cite-backlink"><b><a href="#cite_ref-28">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://fbinfer.com/">"Infer static analyzer"</a>. <i>Infer</i>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=Infer&amp;rft.atitle=Infer+static+analyzer&amp;rft_id=https%3A%2F%2Ffbinfer.com%2F&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AOCaml" class="Z3988"></span></span> </li> <li id="cite_note-29"><span class="mw-cite-backlink"><b><a href="#cite_ref-29">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://github.com/WebAssembly/spec">"WebAssembly/spec: WebAssembly specification, reference interpreter, and test suite"</a>. <a href="/wiki/World_Wide_Web_Consortium" title="World Wide Web Consortium">World Wide Web Consortium</a>. 5 December 2019<span class="reference-accessdate">. Retrieved <span class="nowrap">14 May</span> 2021</span> &#8211; via GitHub.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=WebAssembly%2Fspec%3A+WebAssembly+specification%2C+reference+interpreter%2C+and+test+suite.&amp;rft.pub=World+Wide+Web+Consortium&amp;rft.date=2019-12-05&amp;rft_id=https%3A%2F%2Fgithub.com%2FWebAssembly%2Fspec&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AOCaml" class="Z3988"></span></span> </li> <li id="cite_note-ocaml.org-companies-30"><span class="mw-cite-backlink"><b><a href="#cite_ref-ocaml.org-companies_30-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://ocaml.org/learn/companies.html">"Companies using OCaml"</a>. OCaml.org<span class="reference-accessdate">. Retrieved <span class="nowrap">14 May</span> 2021</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Companies+using+OCaml&amp;rft.pub=OCaml.org&amp;rft_id=https%3A%2F%2Focaml.org%2Flearn%2Fcompanies.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AOCaml" class="Z3988"></span></span> </li> <li id="cite_note-31"><span class="mw-cite-backlink"><b><a href="#cite_ref-31">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="12" class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.techatbloomberg.com/blog/bucklescript-1-0-release-arrived/">"BuckleScript: The 1.0 release has arrived! | Tech at Bloomberg"</a>. <i>Tech at Bloomberg</i>. 8 September 2016<span class="reference-accessdate">. Retrieved <span class="nowrap">21 May</span> 2017</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=Tech+at+Bloomberg&amp;rft.atitle=BuckleScript%3A+The+1.0+release+has+arrived%21+%7C+Tech+at+Bloomberg&amp;rft.date=2016-09-08&amp;rft_id=https%3A%2F%2Fwww.techatbloomberg.com%2Fblog%2Fbucklescript-1-0-release-arrived%2F&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AOCaml" class="Z3988"></span></span> </li> <li id="cite_note-32"><span class="mw-cite-backlink"><b><a href="#cite_ref-32">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFScottSharpGazagnaireMadhavapeddy2010" class="citation conference cs1">Scott, David; Sharp, Richard; Gazagnaire, Thomas; Madhavapeddy, Anil (2010). <a rel="nofollow" class="external text" href="https://dl.acm.org/doi/10.1145/1863543.1863557"><i>Using functional programming within an industrial product group: perspectives and perceptions</i></a>. <a href="/wiki/International_Conference_on_Functional_Programming" title="International Conference on Functional Programming">International Conference on Functional Programming</a>. <a href="/wiki/Association_for_Computing_Machinery" title="Association for Computing Machinery">Association for Computing Machinery</a>. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1145%2F1863543.1863557">10.1145/1863543.1863557</a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=conference&amp;rft.btitle=Using+functional+programming+within+an+industrial+product+group%3A+perspectives+and+perceptions&amp;rft.pub=Association+for+Computing+Machinery&amp;rft.date=2010&amp;rft_id=info%3Adoi%2F10.1145%2F1863543.1863557&amp;rft.aulast=Scott&amp;rft.aufirst=David&amp;rft.au=Sharp%2C+Richard&amp;rft.au=Gazagnaire%2C+Thomas&amp;rft.au=Madhavapeddy%2C+Anil&amp;rft_id=https%3A%2F%2Fdl.acm.org%2Fdoi%2F10.1145%2F1863543.1863557&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AOCaml" class="Z3988"></span></span> </li> <li id="cite_note-33"><span class="mw-cite-backlink"><b><a href="#cite_ref-33">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://github.com/facebook/flow">"Flow on GitHub"</a>. <i><a href="/wiki/GitHub" title="GitHub">GitHub</a></i>. 2023.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=GitHub&amp;rft.atitle=Flow+on+GitHub&amp;rft.date=2023&amp;rft_id=https%3A%2F%2Fgithub.com%2Ffacebook%2Fflow&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AOCaml" class="Z3988"></span></span> </li> <li id="cite_note-34"><span class="mw-cite-backlink"><b><a href="#cite_ref-34">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFYaron_Minsky2011" class="citation web cs1">Yaron Minsky (1 November 2011). <a rel="nofollow" class="external text" href="http://cacm.acm.org/magazines/2011/11/138203-ocaml-for-the-masses/fulltext">"OCaml for the Masses"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">2 May</span> 2015</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=OCaml+for+the+Masses&amp;rft.date=2011-11-01&amp;rft.au=Yaron+Minsky&amp;rft_id=http%3A%2F%2Fcacm.acm.org%2Fmagazines%2F2011%2F11%2F138203-ocaml-for-the-masses%2Ffulltext&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AOCaml" class="Z3988"></span></span> </li> <li id="cite_note-35"><span class="mw-cite-backlink"><b><a href="#cite_ref-35">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFYaron_Minsky2016" class="citation web cs1">Yaron Minsky (2016). <a rel="nofollow" class="external text" href="http://cufp.org/2016/yaron-minsky-keynote.html">"Keynote - Observations of a Functional Programmer"</a>. <a href="/wiki/Association_for_Computing_Machinery" title="Association for Computing Machinery">ACM</a> Commercial Uses of Functional Programming.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Keynote+-+Observations+of+a+Functional+Programmer&amp;rft.pub=ACM+Commercial+Uses+of+Functional+Programming&amp;rft.date=2016&amp;rft.au=Yaron+Minsky&amp;rft_id=http%3A%2F%2Fcufp.org%2F2016%2Fyaron-minsky-keynote.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AOCaml" class="Z3988"></span></span> </li> <li id="cite_note-36"><span class="mw-cite-backlink"><b><a href="#cite_ref-36">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFYaron_Minsky2023" class="citation podcast cs1">Yaron Minsky (2023). <a rel="nofollow" class="external text" href="https://signalsandthreads.com">"Signals &amp; Threads"</a> (Podcast). <a href="/wiki/Jane_Street_Capital" title="Jane Street Capital">Jane Street Capital</a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Signals+%26+Threads&amp;rft.pub=Jane+Street+Capital&amp;rft.date=2023&amp;rft.au=Yaron+Minsky&amp;rft_id=https%3A%2F%2Fsignalsandthreads.com&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AOCaml" class="Z3988"></span></span> </li> <li id="cite_note-37"><span class="mw-cite-backlink"><b><a href="#cite_ref-37">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFAnil_Madhavapeddy2016" class="citation web cs1"><a href="/wiki/Anil_Madhavapeddy" title="Anil Madhavapeddy">Anil Madhavapeddy</a> (2016). <a rel="nofollow" class="external text" href="https://www.docker.com/blog/docker-unikernels-open-source/">"Improving Docker with Unikernels: Introducing HyperKit, VPNKit and DataKit"</a>. <a href="/wiki/Docker,_Inc." title="Docker, Inc.">Docker, Inc.</a></cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Improving+Docker+with+Unikernels%3A+Introducing+HyperKit%2C+VPNKit+and+DataKit&amp;rft.pub=Docker%2C+Inc.&amp;rft.date=2016&amp;rft.au=Anil+Madhavapeddy&amp;rft_id=https%3A%2F%2Fwww.docker.com%2Fblog%2Fdocker-unikernels-open-source%2F&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AOCaml" class="Z3988"></span></span> </li> <li id="cite_note-38"><span class="mw-cite-backlink"><b><a href="#cite_ref-38">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://github.com/moby/vpnkit">"VPNKit on GitHub"</a>. <i><a href="/wiki/GitHub" title="GitHub">GitHub</a></i>. 2023.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=GitHub&amp;rft.atitle=VPNKit+on+GitHub&amp;rft.date=2023&amp;rft_id=https%3A%2F%2Fgithub.com%2Fmoby%2Fvpnkit&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AOCaml" class="Z3988"></span></span> </li> </ol></div></div> <div class="mw-heading mw-heading2"><h2 id="External_links">External links</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=OCaml&amp;action=edit&amp;section=27" title="Edit section: External links"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <style data-mw-deduplicate="TemplateStyles:r1235681985">.mw-parser-output .side-box{margin:4px 0;box-sizing:border-box;border:1px solid #aaa;font-size:88%;line-height:1.25em;background-color:var(--background-color-interactive-subtle,#f8f9fa);display:flow-root}.mw-parser-output .side-box-abovebelow,.mw-parser-output .side-box-text{padding:0.25em 0.9em}.mw-parser-output .side-box-image{padding:2px 0 2px 0.9em;text-align:center}.mw-parser-output .side-box-imageright{padding:2px 0.9em 2px 0;text-align:center}@media(min-width:500px){.mw-parser-output .side-box-flex{display:flex;align-items:center}.mw-parser-output .side-box-text{flex:1;min-width:0}}@media(min-width:720px){.mw-parser-output .side-box{width:238px}.mw-parser-output .side-box-right{clear:right;float:right;margin-left:1em}.mw-parser-output .side-box-left{margin-right:1em}}</style><style data-mw-deduplicate="TemplateStyles:r1237033735">@media print{body.ns-0 .mw-parser-output .sistersitebox{display:none!important}}@media screen{html.skin-theme-clientpref-night .mw-parser-output .sistersitebox img[src*="Wiktionary-logo-en-v2.svg"]{background-color:white}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .sistersitebox img[src*="Wiktionary-logo-en-v2.svg"]{background-color:white}}</style><div class="side-box side-box-right plainlinks sistersitebox"><style data-mw-deduplicate="TemplateStyles:r1126788409">.mw-parser-output .plainlist ol,.mw-parser-output .plainlist ul{line-height:inherit;list-style:none;margin:0;padding:0}.mw-parser-output .plainlist ol li,.mw-parser-output .plainlist ul li{margin-bottom:0}</style> <div class="side-box-flex"> <div class="side-box-image"><span class="noviewer" typeof="mw:File"><a href="/wiki/File:Wikibooks-logo-en-noslogan.svg" class="mw-file-description"><img alt="" src="//upload.wikimedia.org/wikipedia/commons/thumb/d/df/Wikibooks-logo-en-noslogan.svg/40px-Wikibooks-logo-en-noslogan.svg.png" decoding="async" width="40" height="40" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/d/df/Wikibooks-logo-en-noslogan.svg/60px-Wikibooks-logo-en-noslogan.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/d/df/Wikibooks-logo-en-noslogan.svg/80px-Wikibooks-logo-en-noslogan.svg.png 2x" data-file-width="400" data-file-height="400" /></a></span></div> <div class="side-box-text plainlist">Wikibooks has a book on the topic of: <i><b><a href="https://en.wikibooks.org/wiki/OCaml" class="extiw" title="wikibooks:OCaml">OCaml</a></b></i></div></div> </div> <ul><li><span class="official-website"><span class="url"><a rel="nofollow" class="external text" href="https://ocaml.org/">Official website</a></span></span> <span class="mw-valign-text-top" typeof="mw:File/Frameless"><a href="https://www.wikidata.org/wiki/Q212587#P856" title="Edit this at Wikidata"><img alt="Edit this at Wikidata" src="//upload.wikimedia.org/wikipedia/en/thumb/8/8a/OOjs_UI_icon_edit-ltr-progressive.svg/10px-OOjs_UI_icon_edit-ltr-progressive.svg.png" decoding="async" width="10" height="10" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/en/thumb/8/8a/OOjs_UI_icon_edit-ltr-progressive.svg/15px-OOjs_UI_icon_edit-ltr-progressive.svg.png 1.5x, //upload.wikimedia.org/wikipedia/en/thumb/8/8a/OOjs_UI_icon_edit-ltr-progressive.svg/20px-OOjs_UI_icon_edit-ltr-progressive.svg.png 2x" data-file-width="20" data-file-height="20" /></a></span></li> <li><a rel="nofollow" class="external text" href="https://v2.ocaml.org/manual/">OCaml manual</a></li> <li><a rel="nofollow" class="external text" href="https://opam.ocaml.org/">OCaml Package Manager</a></li> <li><a rel="nofollow" class="external text" href="https://dev.realworldocaml.org/">Real World OCaml</a></li></ul> <div class="navbox-styles"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1129693374" /><style data-mw-deduplicate="TemplateStyles:r1236075235">.mw-parser-output .navbox{box-sizing:border-box;border:1px solid #a2a9b1;width:100%;clear:both;font-size:88%;text-align:center;padding:1px;margin:1em auto 0}.mw-parser-output .navbox .navbox{margin-top:0}.mw-parser-output .navbox+.navbox,.mw-parser-output .navbox+.navbox-styles+.navbox{margin-top:-1px}.mw-parser-output .navbox-inner,.mw-parser-output .navbox-subgroup{width:100%}.mw-parser-output .navbox-group,.mw-parser-output .navbox-title,.mw-parser-output .navbox-abovebelow{padding:0.25em 1em;line-height:1.5em;text-align:center}.mw-parser-output .navbox-group{white-space:nowrap;text-align:right}.mw-parser-output .navbox,.mw-parser-output .navbox-subgroup{background-color:#fdfdfd}.mw-parser-output .navbox-list{line-height:1.5em;border-color:#fdfdfd}.mw-parser-output .navbox-list-with-group{text-align:left;border-left-width:2px;border-left-style:solid}.mw-parser-output tr+tr>.navbox-abovebelow,.mw-parser-output tr+tr>.navbox-group,.mw-parser-output tr+tr>.navbox-image,.mw-parser-output tr+tr>.navbox-list{border-top:2px solid #fdfdfd}.mw-parser-output .navbox-title{background-color:#ccf}.mw-parser-output .navbox-abovebelow,.mw-parser-output .navbox-group,.mw-parser-output .navbox-subgroup .navbox-title{background-color:#ddf}.mw-parser-output .navbox-subgroup .navbox-group,.mw-parser-output .navbox-subgroup .navbox-abovebelow{background-color:#e6e6ff}.mw-parser-output .navbox-even{background-color:#f7f7f7}.mw-parser-output .navbox-odd{background-color:transparent}.mw-parser-output .navbox .hlist td dl,.mw-parser-output .navbox .hlist td ol,.mw-parser-output .navbox .hlist td ul,.mw-parser-output .navbox td.hlist dl,.mw-parser-output .navbox td.hlist ol,.mw-parser-output .navbox td.hlist ul{padding:0.125em 0}.mw-parser-output .navbox .navbar{display:block;font-size:100%}.mw-parser-output .navbox-title .navbar{float:left;text-align:left;margin-right:0.5em}body.skin--responsive .mw-parser-output .navbox-image img{max-width:none!important}@media print{body.ns-0 .mw-parser-output .navbox{display:none!important}}</style></div><div role="navigation" class="navbox" aria-labelledby="ML_programming711" style="padding:3px"><table class="nowraplinks hlist mw-collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="3"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1129693374" /><style data-mw-deduplicate="TemplateStyles:r1239400231">.mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}html.skin-theme-clientpref-night .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}@media(prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}}@media print{.mw-parser-output .navbar{display:none!important}}</style><div class="navbar plainlinks hlist navbar-mini"><ul><li class="nv-view"><a href="/wiki/Template:ML_programming" title="Template:ML programming"><abbr title="View this template">v</abbr></a></li><li class="nv-talk"><a href="/w/index.php?title=Template_talk:ML_programming&amp;action=edit&amp;redlink=1" class="new" title="Template talk:ML programming (page does not exist)"><abbr title="Discuss this template">t</abbr></a></li><li class="nv-edit"><a href="/wiki/Special:EditPage/Template:ML_programming" title="Special:EditPage/Template:ML programming"><abbr title="Edit this template">e</abbr></a></li></ul></div><div id="ML_programming711" style="font-size:114%;margin:0 4em"><a href="/wiki/ML_(programming_language)" title="ML (programming language)">ML</a> programming</div></th></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Software" title="Software">Software</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Programming_language_implementation" title="Programming language implementation">Implementations</a>,<br /><a href="/wiki/Dialect_(computing)" class="mw-redirect" title="Dialect (computing)">dialects</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Caml" title="Caml">Caml</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a class="mw-selflink selflink">OCaml</a>° <ul><li><a href="/wiki/Eff_(programming_language)" title="Eff (programming language)">Eff</a></li> <li><a href="/wiki/F*_(programming_language)" title="F* (programming language)">F*</a>°</li> <li><a href="/wiki/F_Sharp_(programming_language)" title="F Sharp (programming language)">F#</a>°</li> <li><a href="/wiki/JoCaml" title="JoCaml">JoCaml</a>°</li> <li><a href="/wiki/Reason_(programming_language)" title="Reason (programming language)">Reason</a>°</li></ul></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Standard_ML" title="Standard ML">Standard ML</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><i><a href="/wiki/Alice_(programming_language)" title="Alice (programming language)">Alice</a></i>°</li> <li><a href="/wiki/Concurrent_ML" title="Concurrent ML">Concurrent ML</a></li> <li><a href="/wiki/Extended_ML" title="Extended ML">Extended ML</a></li> <li><a href="/wiki/MLton" title="MLton">MLton</a>°</li> <li><a href="/wiki/Standard_ML_of_New_Jersey" title="Standard ML of New Jersey">Standard ML of New Jersey</a>° (SML/NJ)</li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><i><a href="/wiki/Dependent_ML" title="Dependent ML">Dependent ML</a></i></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/ATS_(programming_language)" title="ATS (programming language)">ATS</a>°</li></ul> </div></td></tr></tbody></table><div> <ul><li><a href="/wiki/Futhark_(programming_language)" title="Futhark (programming language)">Futhark</a>°</li> <li><a href="/wiki/Lennart_Augustsson#Languages" title="Lennart Augustsson">Lazy ML</a></li> <li><a href="/wiki/MacroML" title="MacroML">MacroML</a></li> <li><a href="/wiki/Ur_(programming_language)" title="Ur (programming language)">Ur</a>°</li></ul></div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Programming_tool" title="Programming tool">Programming tools</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <li><a href="/wiki/Alt-Ergo" title="Alt-Ergo">Alt-Ergo</a>°</li> <li><a href="/wiki/Astr%C3%A9e_(static_analysis)" title="Astrée (static analysis)">Astrée</a></li> <li><a href="/wiki/Camlp4" title="Camlp4">Camlp4</a>°</li> <li><a href="/wiki/FFTW" title="FFTW">FFTW</a>°</li> <li><a href="/wiki/Frama-C" title="Frama-C">Frama-C</a>°</li> <li><a href="/wiki/Haxe" title="Haxe">Haxe</a>°</li> <li><a href="/wiki/Marionnet" title="Marionnet">Marionnet</a>°</li> <li><a href="/wiki/MTASC" title="MTASC">MTASC</a>°</li> <li><a href="/wiki/Poplog" title="Poplog">Poplog</a>°</li> <li><a href="/wiki/Semgrep" title="Semgrep">Semgrep</a>°</li> <li><a href="/wiki/SLAM_project" title="SLAM project">SLAM project</a></li> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Automated_theorem_proving" title="Automated theorem proving">Theorem provers</a>,<br /><a href="/wiki/Proof_assistant" title="Proof assistant">proof assistants</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Rocq_(software)" title="Rocq (software)">Rocq</a>°</li> <li><a href="/wiki/HOL_(proof_assistant)" title="HOL (proof assistant)">HOL</a>° <ul><li><a href="/wiki/HOL_Light" title="HOL Light">HOL Light</a>°</li></ul></li> <li><a href="/wiki/Isabelle_(proof_assistant)" title="Isabelle (proof assistant)">Isabelle</a>°</li> <li><a href="/wiki/LEGO_(proof_assistant)" title="LEGO (proof assistant)">LEGO</a></li> <li><i><a href="/wiki/Logic_for_Computable_Functions" title="Logic for Computable Functions">Logic for Computable Functions</a></i></li> <li><a href="/wiki/Matita" title="Matita">Matita</a>°</li> <li><a href="/wiki/Twelf" title="Twelf">Twelf</a>°</li></ul> </div></td></tr></tbody></table><div> <ul><li><a href="/wiki/GeneWeb" title="GeneWeb">GeneWeb</a>°</li></ul></div></td><td class="noviewer navbox-image" rowspan="2" style="width:1px;padding:0 0 0 2px"><div><span typeof="mw:File"><a href="/wiki/File:OCaml_Logo.svg" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/f/ff/OCaml_Logo.svg/110px-OCaml_Logo.svg.png" decoding="async" width="110" height="30" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/f/ff/OCaml_Logo.svg/165px-OCaml_Logo.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/f/ff/OCaml_Logo.svg/220px-OCaml_Logo.svg.png 2x" data-file-width="525" data-file-height="144" /></a></span></div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Community_of_practice" title="Community of practice">Community</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><th id="Designers9" scope="row" class="navbox-group" style="width:1%">Designers</th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <li><a href="/wiki/Lennart_Augustsson" title="Lennart Augustsson">Lennart Augustsson</a> (Lazy ML)</li> <li><a href="/wiki/Damien_Doligez" title="Damien Doligez">Damien Doligez</a> (OCaml)</li> <li><a href="/wiki/G%C3%A9rard_Huet" title="Gérard Huet">Gérard Huet</a> (Caml)</li> <li><a href="/wiki/Xavier_Leroy" title="Xavier Leroy">Xavier Leroy</a> (Caml, OCaml)</li> <li><a href="/wiki/Robin_Milner" title="Robin Milner">Robin Milner</a> (ML)</li> <li><a href="/wiki/Don_Sannella" title="Don Sannella">Don Sannella</a> (Extended ML)</li> <li><a href="/wiki/Don_Syme" title="Don Syme">Don Syme</a> (F#)</li> </div></td></tr></tbody></table><div> <ul><li><a href="/wiki/Thierry_Coquand" title="Thierry Coquand">Thierry Coquand</a></li> <li><a href="/wiki/Steven_G._Johnson" title="Steven G. Johnson">Steven G. Johnson</a></li> <li><a href="/wiki/Christine_Paulin-Mohring" title="Christine Paulin-Mohring">Christine Paulin-Mohring</a></li> <li><a href="/wiki/Frank_Pfenning" title="Frank Pfenning">Frank Pfenning</a></li> <li><a href="/wiki/Simon_Thompson_(professor)" title="Simon Thompson (professor)">Simon Thompson</a></li></ul></div></td></tr><tr><td class="navbox-abovebelow" colspan="3"><div> <li><i>Italics</i> <b>= discontinued</b></li> <li><b>° = <a href="/wiki/Open-source_software" title="Open-source software">Open-source software</a></b><br /><span class="noviewer" typeof="mw:File"><a href="/wiki/File:Symbol_book_class2.svg" class="mw-file-description" title="Wikipedia book"><img alt="" src="//upload.wikimedia.org/wikipedia/commons/thumb/8/89/Symbol_book_class2.svg/20px-Symbol_book_class2.svg.png" decoding="async" width="16" height="16" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/8/89/Symbol_book_class2.svg/40px-Symbol_book_class2.svg.png 1.5x" data-file-width="180" data-file-height="185" /></a></span> <b><a href="https://en.wikibooks.org/wiki/OCaml" class="extiw" title="wikibooks:OCaml">Book</a></b> <span class="noviewer" typeof="mw:File"><span title="Category"><img alt="" src="//upload.wikimedia.org/wikipedia/en/thumb/9/96/Symbol_category_class.svg/16px-Symbol_category_class.svg.png" decoding="async" width="16" height="16" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/en/thumb/9/96/Symbol_category_class.svg/23px-Symbol_category_class.svg.png 1.5x, //upload.wikimedia.org/wikipedia/en/thumb/9/96/Symbol_category_class.svg/31px-Symbol_category_class.svg.png 2x" data-file-width="180" data-file-height="185" /></span></span> <b><a href="/wiki/Category:ML_programming_language_family" title="Category:ML programming language family">Category:Family:ML</a></b> <span class="noviewer" typeof="mw:File"><span title="Category"><img alt="" src="//upload.wikimedia.org/wikipedia/en/thumb/9/96/Symbol_category_class.svg/16px-Symbol_category_class.svg.png" decoding="async" width="16" height="16" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/en/thumb/9/96/Symbol_category_class.svg/23px-Symbol_category_class.svg.png 1.5x, //upload.wikimedia.org/wikipedia/en/thumb/9/96/Symbol_category_class.svg/31px-Symbol_category_class.svg.png 2x" data-file-width="180" data-file-height="185" /></span></span> <b><a href="/wiki/Category:OCaml_programming_language_family" title="Category:OCaml programming language family">Category:Family:OCaml</a></b> <span class="noviewer" typeof="mw:File"><span title="Category"><img alt="" src="//upload.wikimedia.org/wikipedia/en/thumb/9/96/Symbol_category_class.svg/16px-Symbol_category_class.svg.png" decoding="async" width="16" height="16" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/en/thumb/9/96/Symbol_category_class.svg/23px-Symbol_category_class.svg.png 1.5x, //upload.wikimedia.org/wikipedia/en/thumb/9/96/Symbol_category_class.svg/31px-Symbol_category_class.svg.png 2x" data-file-width="180" data-file-height="185" /></span></span> <b><a href="/wiki/Category:OCaml_software" title="Category:OCaml software">Category:Software:OCaml</a></b></li> </div></td></tr></tbody></table></div> <div class="navbox-styles"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1129693374" /><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236075235" /></div><div role="navigation" class="navbox" aria-labelledby="Programming_languages625" style="padding:3px"><table class="nowraplinks hlist mw-collapsible expanded navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1129693374" /><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1239400231" /><div class="navbar plainlinks hlist navbar-mini"><ul><li class="nv-view"><a href="/wiki/Template:Programming_languages" title="Template:Programming languages"><abbr title="View this template">v</abbr></a></li><li class="nv-talk"><a href="/wiki/Template_talk:Programming_languages" title="Template talk:Programming languages"><abbr title="Discuss this template">t</abbr></a></li><li class="nv-edit"><a href="/wiki/Special:EditPage/Template:Programming_languages" title="Special:EditPage/Template:Programming languages"><abbr title="Edit this template">e</abbr></a></li></ul></div><div id="Programming_languages625" style="font-size:114%;margin:0 4em"><a href="/wiki/Programming_language" title="Programming language">Programming languages</a></div></th></tr><tr><td class="navbox-abovebelow" colspan="2"><div> <ul><li><a href="/wiki/Comparison_of_programming_languages" title="Comparison of programming languages">Comparison</a></li> <li><a href="/wiki/Timeline_of_programming_languages" title="Timeline of programming languages">Timeline</a></li> <li><a href="/wiki/History_of_programming_languages" title="History of programming languages">History</a></li></ul> </div></td></tr><tr><td colspan="2" class="navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Ada_(programming_language)" title="Ada (programming language)">Ada</a></li> <li><a href="/wiki/ALGOL" title="ALGOL">ALGOL</a> <ul><li><a href="/wiki/Simula" title="Simula">Simula</a></li></ul></li> <li><a href="/wiki/APL_(programming_language)" title="APL (programming language)">APL</a></li> <li><a href="/wiki/Assembly_language" title="Assembly language">Assembly</a></li> <li><a href="/wiki/BASIC" title="BASIC">BASIC</a> <ul><li><a href="/wiki/Visual_Basic" title="Visual Basic">Visual Basic</a> <ul><li><a href="/wiki/Visual_Basic_(classic)" title="Visual Basic (classic)">classic</a></li> <li><a href="/wiki/Visual_Basic_(.NET)" title="Visual Basic (.NET)">.NET</a></li></ul></li></ul></li> <li><a href="/wiki/C_(programming_language)" title="C (programming language)">C</a></li> <li><a href="/wiki/C%2B%2B" title="C++">C++</a></li> <li><a href="/wiki/C_Sharp_(programming_language)" title="C Sharp (programming language)">C#</a></li> <li><a href="/wiki/COBOL" title="COBOL">COBOL</a></li> <li><a href="/wiki/Erlang_(programming_language)" title="Erlang (programming language)">Erlang</a></li> <li><a href="/wiki/Forth_(programming_language)" title="Forth (programming language)">Forth</a></li> <li><a href="/wiki/Fortran" title="Fortran">Fortran</a></li> <li><a href="/wiki/Go_(programming_language)" title="Go (programming language)">Go</a></li> <li><a href="/wiki/Haskell" title="Haskell">Haskell</a></li> <li><a href="/wiki/Java_(programming_language)" title="Java (programming language)">Java</a></li> <li><a href="/wiki/JavaScript" title="JavaScript">JavaScript</a> <ul><li><a href="/wiki/TypeScript" title="TypeScript">TypeScript</a></li></ul></li> <li><a href="/wiki/Julia_(programming_language)" title="Julia (programming language)">Julia</a></li> <li><a href="/wiki/Kotlin_(programming_language)" title="Kotlin (programming language)">Kotlin</a></li> <li><a href="/wiki/Lisp_(programming_language)" title="Lisp (programming language)">Lisp</a></li> <li><a href="/wiki/Lua_(programming_language)" title="Lua (programming language)">Lua</a></li> <li><a href="/wiki/MATLAB" title="MATLAB">MATLAB</a></li> <li><a href="/wiki/ML_(programming_language)" title="ML (programming language)">ML</a> <ul><li><a href="/wiki/Caml" title="Caml">Caml </a> <ul><li><a class="mw-selflink selflink">OCaml</a></li></ul></li></ul></li> <li><a href="/wiki/Pascal_(programming_language)" title="Pascal (programming language)">Pascal</a> <ul><li><a href="/wiki/Object_Pascal" title="Object Pascal">Object Pascal</a></li></ul></li> <li><a href="/wiki/Perl" title="Perl">Perl </a> <ul><li><a href="/wiki/Raku_(programming_language)" title="Raku (programming language)">Raku</a></li></ul></li> <li><a href="/wiki/PHP" title="PHP">PHP</a></li> <li><a href="/wiki/Prolog" title="Prolog">Prolog</a></li> <li><a href="/wiki/Python_(programming_language)" title="Python (programming language)">Python</a></li> <li><a href="/wiki/R_(programming_language)" title="R (programming language)">R</a></li> <li><a href="/wiki/Ruby_(programming_language)" title="Ruby (programming language)">Ruby</a></li> <li><a href="/wiki/Rust_(programming_language)" title="Rust (programming language)">Rust</a></li> <li><a href="/wiki/SQL" title="SQL">SQL</a></li> <li><a href="/wiki/Scratch_(programming_language)" title="Scratch (programming language)">Scratch</a></li> <li><a href="/wiki/Shell_script" title="Shell script">Shell</a></li> <li><a href="/wiki/Smalltalk" title="Smalltalk">Smalltalk</a></li> <li><a href="/wiki/Swift_(programming_language)" title="Swift (programming language)">Swift</a></li> <li><i><a href="/wiki/List_of_programming_languages" title="List of programming languages">more...</a></i></li></ul> </div></td></tr><tr><td class="navbox-abovebelow" colspan="2"><div> <ul><li><span class="noviewer" typeof="mw:File"><span title="List-Class article"><img alt="" src="//upload.wikimedia.org/wikipedia/en/thumb/d/db/Symbol_list_class.svg/16px-Symbol_list_class.svg.png" decoding="async" width="16" height="16" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/en/thumb/d/db/Symbol_list_class.svg/23px-Symbol_list_class.svg.png 1.5x, //upload.wikimedia.org/wikipedia/en/thumb/d/db/Symbol_list_class.svg/31px-Symbol_list_class.svg.png 2x" data-file-width="180" data-file-height="185" /></span></span> <b>Lists:</b> <a href="/wiki/List_of_programming_languages" title="List of programming languages">Alphabetical</a></li> <li><a href="/wiki/List_of_programming_languages_by_type" title="List of programming languages by type">Categorical</a></li> <li><a href="/wiki/Generational_list_of_programming_languages" title="Generational list of programming languages">Generational</a></li> <li><a href="/wiki/Non-English-based_programming_languages" title="Non-English-based programming languages">Non-English-based</a></li> <li><span class="noviewer" typeof="mw:File"><span title="Category"><img alt="" src="//upload.wikimedia.org/wikipedia/en/thumb/9/96/Symbol_category_class.svg/16px-Symbol_category_class.svg.png" decoding="async" width="16" height="16" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/en/thumb/9/96/Symbol_category_class.svg/23px-Symbol_category_class.svg.png 1.5x, //upload.wikimedia.org/wikipedia/en/thumb/9/96/Symbol_category_class.svg/31px-Symbol_category_class.svg.png 2x" data-file-width="180" data-file-height="185" /></span></span> <a href="/wiki/Category:Programming_languages" title="Category:Programming languages">Category</a></li></ul> </div></td></tr></tbody></table></div> <div class="navbox-styles"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1129693374" /><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236075235" /></div><div role="navigation" class="navbox authority-control" aria-labelledby="Authority_control_databases_frameless&amp;#124;text-top&amp;#124;10px&amp;#124;alt=Edit_this_at_Wikidata&amp;#124;link=https&amp;#58;//www.wikidata.org/wiki/Q212587#identifiers&amp;#124;class=noprint&amp;#124;Edit_this_at_Wikidata795" style="padding:3px"><table class="nowraplinks hlist mw-collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><div id="Authority_control_databases_frameless&amp;#124;text-top&amp;#124;10px&amp;#124;alt=Edit_this_at_Wikidata&amp;#124;link=https&amp;#58;//www.wikidata.org/wiki/Q212587#identifiers&amp;#124;class=noprint&amp;#124;Edit_this_at_Wikidata795" style="font-size:114%;margin:0 4em"><a href="/wiki/Help:Authority_control" title="Help:Authority control">Authority control databases</a> <span class="mw-valign-text-top noprint" typeof="mw:File/Frameless"><a href="https://www.wikidata.org/wiki/Q212587#identifiers" title="Edit this at Wikidata"><img alt="Edit this at Wikidata" src="//upload.wikimedia.org/wikipedia/en/thumb/8/8a/OOjs_UI_icon_edit-ltr-progressive.svg/10px-OOjs_UI_icon_edit-ltr-progressive.svg.png" decoding="async" width="10" height="10" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/en/thumb/8/8a/OOjs_UI_icon_edit-ltr-progressive.svg/15px-OOjs_UI_icon_edit-ltr-progressive.svg.png 1.5x, //upload.wikimedia.org/wikipedia/en/thumb/8/8a/OOjs_UI_icon_edit-ltr-progressive.svg/20px-OOjs_UI_icon_edit-ltr-progressive.svg.png 2x" data-file-width="20" data-file-height="20" /></a></span></div></th></tr><tr><th scope="row" class="navbox-group" style="width:1%">International</th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"><ul><li><span class="uid"><a rel="nofollow" class="external text" href="https://viaf.org/viaf/8149106282068492326">VIAF</a></span></li></ul></div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">National</th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"><ul><li><span class="uid"><a rel="nofollow" class="external text" href="https://d-nb.info/gnd/7578649-7">Germany</a></span></li><li><span class="uid"><a rel="nofollow" class="external text" href="https://id.loc.gov/authorities/sh2007000473">United States</a></span></li><li><span class="uid"><a rel="nofollow" class="external text" href="https://authority.bibsys.no/authority/rest/authorities/html/10016856">Norway</a></span></li><li><span class="uid"><a rel="nofollow" class="external text" href="https://www.nli.org.il/en/authorities/987007547107805171">Israel</a></span></li></ul></div></td></tr></tbody></table></div> <!-- NewPP limit report Parsed by mw‐web.eqiad.main‐8669bc5c8‐zzvtt Cached time: 20250318155037 Cache expiry: 1152571 Reduced expiry: true Complications: [vary‐revision‐sha1, show‐toc] CPU time usage: 0.849 seconds Real time usage: 1.059 seconds Preprocessor visited node count: 4013/1000000 Post‐expand include size: 118178/2097152 bytes Template argument size: 5516/2097152 bytes Highest expansion depth: 21/100 Expensive parser function count: 47/500 Unstrip recursion depth: 1/20 Unstrip post‐expand size: 179501/5000000 bytes Lua time usage: 0.479/10.000 seconds Lua memory usage: 8773591/52428800 bytes Number of Wikibase entities loaded: 1/400 --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 864.329 1 -total 30.54% 263.948 2 Template:Infobox 26.94% 232.821 1 Template:Infobox_programming_language 20.69% 178.871 1 Template:Reflist 18.45% 159.497 1 Template:Infobox_software/simple 14.45% 124.935 32 Template:Cite_web 13.34% 115.310 2 Template:Wikidata 10.87% 93.945 1 Template:Short_description 10.45% 90.294 5 Template:Navbox 9.29% 80.274 1 Template:ML_programming --> <!-- Saved in parser cache with key enwiki:pcache:39652:|#|:idhash:canonical and timestamp 20250318155037 and revision id 1276758030. 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?useformat=desktop&amp;type=1x1&amp;usesul3=0" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">Retrieved from "<a dir="ltr" href="https://en.wikipedia.org/w/index.php?title=OCaml&amp;oldid=1276758030">https://en.wikipedia.org/w/index.php?title=OCaml&amp;oldid=1276758030</a>"</div></div> <div id="catlinks" class="catlinks" data-mw="interface"><div id="mw-normal-catlinks" class="mw-normal-catlinks"><a href="/wiki/Help:Category" title="Help:Category">Categories</a>: <ul><li><a href="/wiki/Category:High-level_programming_languages" title="Category:High-level programming languages">High-level programming languages</a></li><li><a href="/wiki/Category:Cross-platform_free_software" title="Category:Cross-platform free software">Cross-platform free software</a></li><li><a href="/wiki/Category:Extensible_syntax_programming_languages" title="Category:Extensible syntax programming languages">Extensible syntax programming languages</a></li><li><a href="/wiki/Category:Free_and_open_source_interpreters" title="Category:Free and open source interpreters">Free and open source interpreters</a></li><li><a href="/wiki/Category:Functional_languages" title="Category:Functional languages">Functional languages</a></li><li><a href="/wiki/Category:Object-oriented_programming_languages" title="Category:Object-oriented programming languages">Object-oriented programming languages</a></li><li><a href="/wiki/Category:ML_programming_language_family" title="Category:ML programming language family">ML programming language family</a></li><li><a href="/wiki/Category:OCaml_programming_language_family" title="Category:OCaml programming language family">OCaml programming language family</a></li><li><a href="/wiki/Category:OCaml_software" title="Category:OCaml software">OCaml software</a></li><li><a href="/wiki/Category:Pattern_matching_programming_languages" title="Category:Pattern matching programming languages">Pattern matching programming languages</a></li><li><a href="/wiki/Category:Programming_languages_created_in_1996" title="Category:Programming languages created in 1996">Programming languages created in 1996</a></li><li><a href="/wiki/Category:Statically_typed_programming_languages" title="Category:Statically typed programming languages">Statically typed programming languages</a></li><li><a href="/wiki/Category:Software_using_the_GNU_Lesser_General_Public_License" title="Category:Software using the GNU Lesser General Public License">Software using the GNU Lesser General Public License</a></li></ul></div><div id="mw-hidden-catlinks" class="mw-hidden-catlinks mw-hidden-cats-hidden">Hidden categories: <ul><li><a href="/wiki/Category:CS1_errors:_missing_title" title="Category:CS1 errors: missing title">CS1 errors: missing title</a></li><li><a href="/wiki/Category:CS1_errors:_bare_URL" title="Category:CS1 errors: bare URL">CS1 errors: bare URL</a></li><li><a href="/wiki/Category:Articles_with_short_description" title="Category:Articles with short description">Articles with short description</a></li><li><a href="/wiki/Category:Short_description_is_different_from_Wikidata" title="Category:Short description is different from Wikidata">Short description is different from Wikidata</a></li><li><a href="/wiki/Category:Use_dmy_dates_from_November_2022" title="Category:Use dmy dates from November 2022">Use dmy dates from November 2022</a></li><li><a href="/wiki/Category:Articles_needing_additional_references_from_January_2024" title="Category:Articles needing additional references from January 2024">Articles needing additional references from January 2024</a></li><li><a href="/wiki/Category:All_articles_needing_additional_references" title="Category:All articles needing additional references">All articles needing additional references</a></li><li><a href="/wiki/Category:Articles_with_example_OCaml_code" title="Category:Articles with example OCaml code">Articles with example OCaml code</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"> This page was last edited on 20 February 2025, at 15:41<span class="anonymous-show">&#160;(UTC)</span>.</li> <li id="footer-info-copyright">Text is available under the <a href="/wiki/Wikipedia:Text_of_the_Creative_Commons_Attribution-ShareAlike_4.0_International_License" title="Wikipedia:Text of the Creative Commons Attribution-ShareAlike 4.0 International License">Creative Commons Attribution-ShareAlike 4.0 License</a>; additional terms may apply. By using this site, you agree to the <a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Terms_of_Use" class="extiw" title="foundation:Special:MyLanguage/Policy:Terms of Use">Terms of Use</a> and <a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy" class="extiw" title="foundation:Special:MyLanguage/Policy:Privacy policy">Privacy Policy</a>. Wikipedia® is a registered trademark of the <a rel="nofollow" class="external text" href="https://wikimediafoundation.org/">Wikimedia Foundation, Inc.</a>, a non-profit organization.</li> </ul> <ul id="footer-places"> <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">Privacy policy</a></li> <li id="footer-places-about"><a href="/wiki/Wikipedia:About">About Wikipedia</a></li> <li id="footer-places-disclaimers"><a href="/wiki/Wikipedia:General_disclaimer">Disclaimers</a></li> <li id="footer-places-contact"><a href="//en.wikipedia.org/wiki/Wikipedia:Contact_us">Contact Wikipedia</a></li> <li id="footer-places-wm-codeofconduct"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Universal_Code_of_Conduct">Code of Conduct</a></li> <li id="footer-places-developers"><a href="https://developer.wikimedia.org">Developers</a></li> <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/#/en.wikipedia.org">Statistics</a></li> <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement">Cookie statement</a></li> <li id="footer-places-mobileview"><a href="//en.m.wikipedia.org/w/index.php?title=OCaml&amp;mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">Mobile view</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"><picture><source media="(min-width: 500px)" srcset="/static/images/footer/wikimedia-button.svg" width="84" height="29"><img src="/static/images/footer/wikimedia.svg" width="25" height="25" alt="Wikimedia Foundation" lang="en" loading="lazy"></picture></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"><picture><source media="(min-width: 500px)" srcset="/w/resources/assets/poweredby_mediawiki.svg" width="88" height="31"><img src="/w/resources/assets/mediawiki_compact.svg" alt="Powered by MediaWiki" lang="en" width="25" height="25" loading="lazy"></picture></a></li> </ul> </footer> </div> </div> </div> <div class="vector-header-container vector-sticky-header-container"> <div id="vector-sticky-header" class="vector-sticky-header"> <div class="vector-sticky-header-start"> <div class="vector-sticky-header-icon-start vector-button-flush-left vector-button-flush-right" aria-hidden="true"> <button class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-sticky-header-search-toggle" tabindex="-1" data-event-name="ui.vector-sticky-search-form.icon"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>Search</span> </button> </div> <div role="search" class="vector-search-box-vue vector-search-box-show-thumbnail vector-search-box"> <div class="vector-typeahead-search-container"> <div class="cdx-typeahead-search cdx-typeahead-search--show-thumbnail"> <form action="/w/index.php" id="vector-sticky-search-form" class="cdx-search-input cdx-search-input--has-end-button"> <div 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="Search Wikipedia"> <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="Special:Search"> </div> <button class="cdx-button cdx-search-input__end-button">Search</button> </form> </div> </div> </div> <div class="vector-sticky-header-context-bar"> <nav aria-label="Contents" class="vector-toc-landmark"> <div id="vector-sticky-header-toc" class="vector-dropdown mw-portlet mw-portlet-sticky-header-toc vector-sticky-header-toc vector-button-flush-left" > <input type="checkbox" id="vector-sticky-header-toc-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-sticky-header-toc" class="vector-dropdown-checkbox " aria-label="Toggle the table of contents" > <label id="vector-sticky-header-toc-label" for="vector-sticky-header-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">Toggle the table of contents</span> </label> <div class="vector-dropdown-content"> <div id="vector-sticky-header-toc-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <div class="vector-sticky-header-context-bar-primary" aria-hidden="true" ><span class="mw-page-title-main">OCaml</span></div> </div> </div> <div class="vector-sticky-header-end" aria-hidden="true"> <div class="vector-sticky-header-icons"> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only" id="ca-talk-sticky-header" tabindex="-1" data-event-name="talk-sticky-header"><span class="vector-icon mw-ui-icon-speechBubbles mw-ui-icon-wikimedia-speechBubbles"></span> <span></span> </a> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only" id="ca-subject-sticky-header" tabindex="-1" data-event-name="subject-sticky-header"><span class="vector-icon mw-ui-icon-article mw-ui-icon-wikimedia-article"></span> <span></span> </a> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only" id="ca-history-sticky-header" tabindex="-1" data-event-name="history-sticky-header"><span class="vector-icon mw-ui-icon-wikimedia-history mw-ui-icon-wikimedia-wikimedia-history"></span> <span></span> </a> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only mw-watchlink" id="ca-watchstar-sticky-header" tabindex="-1" data-event-name="watch-sticky-header"><span class="vector-icon mw-ui-icon-wikimedia-star mw-ui-icon-wikimedia-wikimedia-star"></span> <span></span> </a> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only" id="ca-edit-sticky-header" tabindex="-1" data-event-name="wikitext-edit-sticky-header"><span class="vector-icon mw-ui-icon-wikimedia-wikiText mw-ui-icon-wikimedia-wikimedia-wikiText"></span> <span></span> </a> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only" id="ca-ve-edit-sticky-header" tabindex="-1" data-event-name="ve-edit-sticky-header"><span class="vector-icon mw-ui-icon-wikimedia-edit mw-ui-icon-wikimedia-wikimedia-edit"></span> <span></span> </a> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only" id="ca-viewsource-sticky-header" tabindex="-1" data-event-name="ve-edit-protected-sticky-header"><span class="vector-icon mw-ui-icon-wikimedia-editLock mw-ui-icon-wikimedia-wikimedia-editLock"></span> <span></span> </a> </div> <div class="vector-sticky-header-buttons"> <button class="cdx-button cdx-button--weight-quiet mw-interlanguage-selector" id="p-lang-btn-sticky-header" tabindex="-1" data-event-name="ui.dropdown-p-lang-btn-sticky-header"><span class="vector-icon mw-ui-icon-wikimedia-language mw-ui-icon-wikimedia-wikimedia-language"></span> <span>33 languages</span> </button> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--action-progressive" id="ca-addsection-sticky-header" tabindex="-1" data-event-name="addsection-sticky-header"><span class="vector-icon mw-ui-icon-speechBubbleAdd-progressive mw-ui-icon-wikimedia-speechBubbleAdd-progressive"></span> <span>Add topic</span> </a> </div> <div class="vector-sticky-header-icon-end"> <div class="vector-user-links"> </div> </div> </div> </div> </div> <div class="mw-portlet mw-portlet-dock-bottom emptyPortlet" id="p-dock-bottom"> <ul> </ul> </div> <script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgHostname":"mw-web.eqiad.main-78bdfcd464-mxgkt","wgBackendResponseTime":211,"wgPageParseReport":{"limitreport":{"cputime":"0.849","walltime":"1.059","ppvisitednodes":{"value":4013,"limit":1000000},"postexpandincludesize":{"value":118178,"limit":2097152},"templateargumentsize":{"value":5516,"limit":2097152},"expansiondepth":{"value":21,"limit":100},"expensivefunctioncount":{"value":47,"limit":500},"unstrip-depth":{"value":1,"limit":20},"unstrip-size":{"value":179501,"limit":5000000},"entityaccesscount":{"value":1,"limit":400},"timingprofile":["100.00% 864.329 1 -total"," 30.54% 263.948 2 Template:Infobox"," 26.94% 232.821 1 Template:Infobox_programming_language"," 20.69% 178.871 1 Template:Reflist"," 18.45% 159.497 1 Template:Infobox_software/simple"," 14.45% 124.935 32 Template:Cite_web"," 13.34% 115.310 2 Template:Wikidata"," 10.87% 93.945 1 Template:Short_description"," 10.45% 90.294 5 Template:Navbox"," 9.29% 80.274 1 Template:ML_programming"]},"scribunto":{"limitreport-timeusage":{"value":"0.479","limit":"10.000"},"limitreport-memusage":{"value":8773591,"limit":52428800}},"cachereport":{"origin":"mw-web.eqiad.main-8669bc5c8-zzvtt","timestamp":"20250318155037","ttl":1152571,"transientcontent":true}}});});</script> <script type="application/ld+json">{"@context":"https:\/\/schema.org","@type":"Article","name":"OCaml","url":"https:\/\/en.wikipedia.org\/wiki\/OCaml","sameAs":"http:\/\/www.wikidata.org\/entity\/Q212587","mainEntity":"http:\/\/www.wikidata.org\/entity\/Q212587","author":{"@type":"Organization","name":"Contributors to Wikimedia projects"},"publisher":{"@type":"Organization","name":"Wikimedia Foundation, Inc.","logo":{"@type":"ImageObject","url":"https:\/\/www.wikimedia.org\/static\/images\/wmf-hor-googpub.png"}},"datePublished":"2002-02-25T15:43:11Z","dateModified":"2025-02-20T15:41:13Z","headline":"extension of the Caml programming language"}</script> </body> </html>

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