CINXE.COM
Learn OCaml
<!DOCTYPE html> <html lang="en"> <head id="htmx-head"> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="description" content="Getting started with the OCaml programming language. Read the official tutorials, exercices, and language manual."> <meta name="twitter:title" content="Learn OCaml"> <meta name="twitter:description" content="Getting started with the OCaml programming language. Read the official tutorials, exercices, and language manual."> <meta name="twitter:image" content="https://ocaml.org/_/MWIyY2ZmMWM5YzdkYWNmYWI4NGQ0MDBjOGFiZTYxOTg/ocaml_org_social_media.png"> <meta property="og:site_name" content="OCaml"> <meta property="og:type" content="object"> <meta property="og:title" content="Learn OCaml"> <meta property="og:description" content="Getting started with the OCaml programming language. Read the official tutorials, exercices, and language manual."> <meta name="og:image" content="https://ocaml.org/_/MWIyY2ZmMWM5YzdkYWNmYWI4NGQ0MDBjOGFiZTYxOTg/ocaml_org_social_media.png"> <meta name="theme-color" content="#fff" > <meta name="color-scheme" content="white"> <meta name="ahrefs-site-verification" content="6ff715b377cdcd566334b44ae8888791189ce24640c8a403eacdc3bcbaa9449b"> <link rel="canonical" href="https://ocaml.org/docs"> <link rel="icon" type="image/x-icon" href="/_/ZDJmMjgzN2NkZmJlMzgxNGQxMTMxNGVlMzk1NzZkN2I/favicon.ico"> <link rel="manifest" href="/manifest.json"> <link rel="stylesheet" href="/_/M2QzNTJkMGFlMzUxZDFkZDE4MDdjYzljNThkN2U1YjQ/css/main.css"> <link rel="stylesheet" href="/_/NmFjYjY5ZmIxYWRhMWQxMTQxODM4ZDEwYTgwMDcwNmI/vendors/font-files/inter.css"> <link rel="stylesheet" href="/_/YjM3OGY4YzIwN2E2ZmUxZTczOWVkNDQwZWRhMDU0MGM/vendors/font-files/roboto-mono.css"> <script defer src="/_/OWYyZDQyZjg4MTFlNWEzZjE4ZGY0YWM0OTU1NGEzYTI/vendors/alpine-clipboard.js"></script> <script defer src="/_/NGI1NjQzZjdkODY0MTY2MmViNThhM2VlZTYwMDk3NTI/vendors/alpine.min.js"></script> <script defer src="/_/YTNhODI2Yzg0Yzk4M2ZiNDcxYmRiYzdhY2FiN2Y0OWQ/vendors/htmx.min.js"></script> <script defer data-domain="ocaml.org" src="https://plausible.ci.dev/js/script.js"></script> <link rel="search" href="/opensearch.xml" type="application/opensearchdescription+xml" title="OCaml"> <title>Learn OCaml</title> </head> <body> <script> if (localStorage.theme === 'dark' || (!('theme' in localStorage) && window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches)) { document.body.classList.add("dark"); } else { document.body.classList.remove("dark"); } </script> <header class="h-20 flex items-center bg-sand dark:bg-dark-background_navigation" x-data="{ open: false }"> <nav class="container-fluid wide header flex justify-between items-center gap-5 xl:gap-8"> <ul class="order-0 space space-x-5 xl:space-x-8 items-center flex text-content font-medium dark:text-title dark:text-opacity-60 dark:font-semibold"> <li style="width:132px"> <a href="/" class="block pb-2"> <img src="/_/MDBjN2M4YjIxY2Y1YWExZWE3Njk4M2FiZTg1NWZjNTM/logo-with-name.svg" width="132" alt="OCaml logo" class="dark:hidden"> <img src="/_/MTE3YWE5YzJlZmExNmYyMmI3ZmEwYjliMDEwNDBkMDY/logo-with-name-white.svg" width="132" alt="OCaml logo" class="hidden dark:inline"> </a> </li> </ul> <ul class="order-2 hidden lg:flex items-center"> <li> <form x-data="{ row: null, col: 0, max: 0, total: 0 }" @submit="if (row !== null) { window.location = document.getElementById('package-autocomplete-'+row+'-'+col).getAttribute('href'); $event.stopPropagation(); $event.preventDefault(); return false }" action="/packages/search" method="GET"> <div class="dropdown-container flex items-center justify-center h-10 rounded-md focus-within:outline-primary_25 dark:focus-within:outline-dark-primary_40 focus-within:outline focus-within:outline-2 lg:w-56 xl:w-80" tabindex="0"> <label for="q" class="sr-only">Search OCaml packages</label> <input type="search" name="q" placeholder="Search OCaml packages" @keydown.escape="$event.target.blur()" class="bg-white dark:bg-dark-card text-title dark:text-dark-title h-full w-full font-normal focus:border-primary dark:focus:border-dark-primary focus:ring-0 border-primary dark:border-dark-primary rounded-md rounded-r-none px-3 py-1 placeholder-text-content dark:placeholder:text-dark-content appearance-none focus:outline-none" @keydown.stop @keyup.down="if (row === null) { row = 0; col = 0; } else { row +=1; if (row > max) { row = max } }" @keyup.up="if (row !== null) { row -=1; if (row < 0) { row = null } }" @keyup.right="if (col < 1) col++" @keyup.left="if (col >= 1) col--" :aria-activedescendant="row !== null ? 'package-autocomplete-'+row+'-'+col : null" hx-get="/packages/autocomplete" hx-params="q" hx-trigger="keyup changed, search" hx-target="#header-search-results" hx-indicator="#header-search-indicator" autocomplete="off" > <button aria-label="search" class="h-full flex items-center justify-center rounded-r-md bg-primary dark:bg-dark-primary text-white dark:text-dark-white px-4" type="submit" ><svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" /> </svg> </button> <div class="dropdown w-full lg:w-[32rem] xl:w-[32rem] z-10 absolute rounded-md mt-12 shadow-2xl top-1 p-2 bg-background dark:bg-dark-background shadow-3xl dark:outline dark:outline-1 dark:outline-primary"> <div id="header-search-results" aria-live="polite"></div> <a class="flex py-2 px-2 mx-2 gap-4 hover:bg-primary_nav_block_hover_10 dark:hover:bg-dark-primary_nav_block_hover_10 font-normal rounded-md text-primary dark:text-dark-primary" href="/api"> Standard Library API <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path> </svg> </a> </div> </div> </form> </li> </ul> <ul class="order-1 mr-auto items-center hidden lg:flex font-medium dark:text-white dark:text-opacity-60 dark:font-semibold"> <li><a href="/docs" class="block font-normal py-3 mg:py-4 px-1 lg:px-3 hover:text-primary dark:hover:text-dark-primary text-primary dark:text-dark-primary underline">Learn</a> </li> <li><a href="/tools" class="block font-normal py-3 mg:py-4 px-1 lg:px-3 hover:text-primary dark:hover:text-dark-primary text-title dark:text-dark-title">Tools</a> </li> <li><a href="/packages" class="block font-normal py-3 mg:py-4 px-1 lg:px-3 hover:text-primary dark:hover:text-dark-primary text-title dark:text-dark-title">Packages</a> </li> <li><a href="/community" class="block font-normal py-3 mg:py-4 px-1 lg:px-3 hover:text-primary dark:hover:text-dark-primary text-title dark:text-dark-title">Community</a> </li> <li><a href="/changelog" class="block font-normal py-3 mg:py-4 px-1 lg:px-3 hover:text-primary dark:hover:text-dark-primary text-title dark:text-dark-title">News</a> </li> <li><a href="/play" class="block font-normal py-3 mg:py-4 px-1 lg:px-3 hover:text-primary dark:hover:text-dark-primary text-title dark:text-dark-title">Play</a> </li> </ul> <ul class="order-3 hidden lg:flex items-center"> <li><a href="/docs/get-started" class="border border-primary dark:border-dark-primary text-primary dark:text-dark-primary font-bold py-2.5 px-7 whitespace-nowrap rounded">Get Started</a></li> </ul> <ul class="order-1 lg:hidden flex items-center"> <li class="h-12 w-12 hover:bg-primary_25 dark:hover:bg-primary_20 flex items-center justify-center rounded-full text-content dark:text-dark-title"> <button aria-label="open menu" @click="open = ! open"> <svg xmlns="http://www.w3.org/2000/svg" class="h-8 w-8" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 10h16M4 14h16M4 18h16" /> </svg> </button> </li> </ul> </nav> <div class="bg-black fixed w-full h-full left-0 top-0 opacity-60 z-40" x-show='open' x-cloak></div> <nav class="z-50 h-full fixed right-0 top-0 max-w-full w-96 bg-background dark:bg-dark-background shadow-lg" x-show="open" x-cloak @click.away="open = false" x-transition:enter="transition duration-200 ease-out" x-transition:enter-start="translate-x-full" x-transition:leave="transition duration-100 ease-in" x-transition:leave-end="translate-x-full"> <ul class="text-content p-6 font-semibold"> <li class="flex justify-between items-center"> <a href="/"> <img src="/_/MDBjN2M4YjIxY2Y1YWExZWE3Njk4M2FiZTg1NWZjNTM/logo-with-name.svg" width="132" alt="OCaml logo" class="dark:hidden"> <img src="/_/MTE3YWE5YzJlZmExNmYyMmI3ZmEwYjliMDEwNDBkMDY/logo-with-name-white.svg" width="132" alt="OCaml logo" class="hidden dark:inline"> </a> <div class="" x-on:click="open = false"> <button aria-label="close" class="text-content dark:text-dark-title"> <svg xmlns="http://www.w3.org/2000/svg" class="h-8 w-8" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" /> </svg> </button> </div> </li> <li class="mt-6 mb-3"> <form action="/packages/search" method="GET"> <div class="dropdown-container flex items-center justify-center h-10 rounded-md focus-within:outline-primary_25 dark:focus-within:outline-dark-primary_40 focus-within:outline focus-within:outline-2 " tabindex="0"> <label for="q" class="sr-only">Search OCaml packages</label> <input type="search" name="q" placeholder="Search OCaml packages" @keydown.escape="$event.target.blur()" class="bg-white dark:bg-dark-card text-title dark:text-dark-title h-full w-full font-normal focus:border-primary dark:focus:border-dark-primary focus:ring-0 border-primary dark:border-dark-primary rounded-md rounded-r-none px-3 py-1 placeholder-text-content dark:placeholder:text-dark-content appearance-none focus:outline-none" > <button aria-label="search" class="h-full flex items-center justify-center rounded-r-md bg-primary dark:bg-dark-primary text-white dark:text-dark-white px-4" type="submit" ><svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" /> </svg> </button> </div> </form> </li> <li><a href="/docs" class="block font-normal py-3 mg:py-4 px-1 lg:px-3 hover:text-primary dark:hover:text-dark-primaryblock text-primary dark:text-dark-primary underline">Learn</a> </li> <li><a href="/tools" class="block font-normal py-3 mg:py-4 px-1 lg:px-3 hover:text-primary dark:hover:text-dark-primaryblock text-title dark:text-dark-title">Tools</a> </li> <li><a href="/packages" class="block font-normal py-3 mg:py-4 px-1 lg:px-3 hover:text-primary dark:hover:text-dark-primaryblock text-title dark:text-dark-title">Packages</a> </li> <li><a href="/community" class="block font-normal py-3 mg:py-4 px-1 lg:px-3 hover:text-primary dark:hover:text-dark-primaryblock text-title dark:text-dark-title">Community</a> </li> <li><a href="/changelog" class="block font-normal py-3 mg:py-4 px-1 lg:px-3 hover:text-primary dark:hover:text-dark-primaryblock text-title dark:text-dark-title">News</a> </li> <li><a href="/play" class="block font-normal py-3 mg:py-4 px-1 lg:px-3 hover:text-primary dark:hover:text-dark-primaryblock text-title dark:text-dark-title">Play</a> </li> <li> <a href="/api" class="flex py-3 px-1 gap-4 font-semibold text-primary dark:text-dark-primary">Standard Library API<svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path> </svg> </a> </li> <li class="mt-3 mb-6"> <a href="/docs/get-started" class="w-full rounded font-normal py-3 px-7 flex items-center justify-center bg-primary dark:bg-dark-primary text-white dark:text-dark-title">Get started</a> </li> <li> <div class="space-x-6 text-2xl flex items-center"> <a aria-label="OCaml's Discord" href="https://discord.gg/cCYQbqN" class="opacity-60 hover:opacity-100 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"> <path fill-rule="evenodd" d="M18.9419 5.29661C17.6473 4.69088 16.263 4.25066 14.8157 4C14.638 4.32134 14.4304 4.75355 14.2872 5.09738C12.7487 4.86601 11.2245 4.86601 9.7143 5.09738C9.57116 4.75355 9.3588 4.32134 9.17947 4C7.73067 4.25066 6.3448 4.6925 5.05016 5.29982C2.43887 9.24582 1.73099 13.0938 2.08493 16.8872C3.81688 18.1805 5.49534 18.9662 7.14548 19.4804C7.55291 18.9196 7.91628 18.3235 8.22931 17.6953C7.63313 17.4688 7.06211 17.1892 6.52256 16.8647C6.6657 16.7586 6.80571 16.6478 6.94098 16.5337C10.2318 18.0729 13.8074 18.0729 17.0589 16.5337C17.1958 16.6478 17.3358 16.7586 17.4774 16.8647C16.9362 17.1908 16.3637 17.4704 15.7675 17.697C16.0805 18.3235 16.4423 18.9212 16.8513 19.4819C18.503 18.9678 20.183 18.1822 21.915 16.8872C22.3303 12.4897 21.2056 8.67705 18.9419 5.29661ZM8.67765 14.5543C7.68977 14.5543 6.87963 13.632 6.87963 12.509C6.87963 11.3859 7.67247 10.4621 8.67765 10.4621C9.68285 10.4621 10.493 11.3843 10.4757 12.509C10.4772 13.632 9.68285 14.5543 8.67765 14.5543ZM15.3223 14.5543C14.3344 14.5543 13.5243 13.632 13.5243 12.509C13.5243 11.3859 14.3171 10.4621 15.3223 10.4621C16.3275 10.4621 17.1376 11.3843 17.1203 12.509C17.1203 13.632 16.3275 14.5543 15.3223 14.5543Z" clip-rule="evenodd" /> </svg> </a> <a aria-label="The OCaml Compiler on GitHub" href="https://github.com/ocaml/ocaml" class="opacity-60 hover:opacity-100 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"> <path fill-rule="evenodd" d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z" clip-rule="evenodd" /> </svg> </a> <a aria-label="The OCaml Language Twitter Account" href="https://twitter.com/ocaml_org" class="opacity-60 hover:opacity-100 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"> <path d="M8.29 20.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0022 5.92a8.19 8.19 0 01-2.357.646 4.118 4.118 0 001.804-2.27 8.224 8.224 0 01-2.605.996 4.107 4.107 0 00-6.993 3.743 11.65 11.65 0 01-8.457-4.287 4.106 4.106 0 001.27 5.477A4.072 4.072 0 012.8 9.713v.052a4.105 4.105 0 003.292 4.022 4.095 4.095 0 01-1.853.07 4.108 4.108 0 003.834 2.85A8.233 8.233 0 012 18.407a11.616 11.616 0 006.29 1.84" /> </svg> </a> </div> </li> </ul> </nav> </header> <script> window.addEventListener('keydown', function(event) { if (event.key === "/") { event.preventDefault(); document.querySelector("input[type='search']").focus() } }) </script> <main class="bg-background dark:bg-dark-background"><nav aria-label="breadcrumbs" class="px-4 flex bg-title dark:bg-[#111827] text-white dark:text-dark-title md:hidden"> <ul> <li class="inline-block"> <a href="/docs" class="flex items-center px-2 py-2 border-transparent border-2 border-b-4"> Learn <span> <svg xmlns="http://www.w3.org/2000/svg" class="w-3 h-3 ml-2" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5" /> </svg> </span> </a> </li> <li class="inline-block"> <select onchange="location = this.value;" class="appearance-none border-2 border-b-4 bg-transparent bg-none font-bold border-none w-auto p-0 m-0 cursor-pointer focus:outline-none focus:ring-0"> <option value="/docs" selected> Overview </option> <option value="/docs/get-started" > Get Started </option> <option value="/docs/language" > Language </option> <option value="/docs/tools" > Platform </option> <option value="/docs/guides" > Guides </option> <option value="/cookbook" > Cookbook </option> <option value="/exercises" > Exercises </option> <option value="/books" > Books </option> </select> <span class="text-primary dark:text-dark-primary cursor-pointer">▾</span> </li> </ul> </nav> <div class="bg-title dark:bg-[#111827] hidden md:flex"> <nav class="container-fluid wide flex flex-wrap"> <a href="/docs" class="justify-start px-4 py-2 text-white dark:text-dark-title items-center font-normal border-2 border-b-4 border-transparent rounded border-b-primary dark:border-b-dark-primary"> Overview </a> <a href="/docs/get-started" class="justify-start px-4 py-2 text-white dark:text-dark-title items-center font-normal border-2 border-b-4 border-transparent rounded opacity-80 hover:text-primary dark:hover:text-dark-primary"> Get Started </a> <a href="/docs/language" class="justify-start px-4 py-2 text-white dark:text-dark-title items-center font-normal border-2 border-b-4 border-transparent rounded opacity-80 hover:text-primary dark:hover:text-dark-primary"> Language </a> <a href="/docs/tools" class="justify-start px-4 py-2 text-white dark:text-dark-title items-center font-normal border-2 border-b-4 border-transparent rounded opacity-80 hover:text-primary dark:hover:text-dark-primary"> Platform </a> <a href="/docs/guides" class="justify-start px-4 py-2 text-white dark:text-dark-title items-center font-normal border-2 border-b-4 border-transparent rounded opacity-80 hover:text-primary dark:hover:text-dark-primary"> Guides </a> <a href="/cookbook" class="justify-start px-4 py-2 text-white dark:text-dark-title items-center font-normal border-2 border-b-4 border-transparent rounded opacity-80 hover:text-primary dark:hover:text-dark-primary"> Cookbook </a> <a href="/exercises" class="justify-start px-4 py-2 text-white dark:text-dark-title items-center font-normal border-2 border-b-4 border-transparent rounded opacity-80 hover:text-primary dark:hover:text-dark-primary"> Exercises </a> <a href="/books" class="justify-start px-4 py-2 text-white dark:text-dark-title items-center font-normal border-2 border-b-4 border-transparent rounded opacity-80 hover:text-primary dark:hover:text-dark-primary"> Books </a> </nav> </div> <div class="bg-background dark:bg-dark-background"> <div class="flex-1 z-0 z- min-w-0 pb-12"> <div class="w-full border-b bg-[#DDEAFC] dark:bg-[#101B3F] md:bg-transparent dark:border-none md:bg-[length:100%_100%] md:bg-[url('/img/learn/hero-background.svg')] dark:md:bg-[url('/img/learn/hero-background-dark.svg')]"> <div class="container-fluid py-10 md:py-24 md:flex md:gap-20 bg-left-bottom bg-no-repeat md:bg-[url('/img/learn/hero-camel.svg')] dark:md:bg-[url('/img/learn/dark-hero-camel.svg')]"> <div class="md:flex-grow"> <h1 class="text-title dark:text-dark-title tracking-wider">Explore the OCaml Documentation</h1> <div class="text-content dark:text-dark-content my-6 max-w-md"> You can explore the OCaml documentation, Platform Tools, guides, exercises, and books to enhance your knowledge. </div> <form action="/docs/search" method="GET" class="max-w-[32rem]"> <div class="dropdown-container flex items-center justify-center h-16 rounded-md focus-within:outline-primary_25 dark:focus-within:outline-dark-primary_40 focus-within:outline focus-within:outline-2 mb-4" tabindex="0"> <label for="q" class="sr-only">Search inside the OCaml documentation</label> <input type="search" name="q" placeholder="Search inside the OCaml documentation" class="bg-white dark:bg-dark-card text-lg text-title dark:text-dark-title h-full w-full px-5 font-normal border-[2px] focus:border-primary dark:focus:border-dark-primary focus:ring-0 border-primary dark:border-dark-primary rounded-md rounded-r-none placeholder-text-content dark:placeholder:text-dark-content appearance-none focus:outline-none" > <button aria-label="search" class="h-full flex items-center justify-center rounded-r-md bg-primary dark:bg-dark-primary text-white dark:text-dark-white px-4" type="submit" ><svg xmlns="http://www.w3.org/2000/svg" class="w-8 h-8" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" /> </svg> </button> </div> </form> </div> <div class="flex flex-col gap-4 md:gap-6 md:w-80"> <a href="/install" class="group whitespace-nowrap h-16 flex p-4 px-5 w-full items-center bg-white dark:bg-dark-card hover:bg-primary dark:hover:bg-dark-primary hover:text-white dark:hover:text-dark-title drop-shadow hover:drop-shadow-xl border-primary dark:border-dark-primary border-[3px] rounded-lg text-title dark:text-dark-title "> <span class="group-hover:text-white dark:group-hover:text-dark-title text-primary dark:text-dark-primary mr-2"><svg width="24" height="21" class="w-5 h-5" viewBox="0 0 24 21" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12.4515 18.392C12.404 18.2019 12.499 17.9643 12.404 17.7742C12.3564 17.5841 12.2139 17.5841 12.1663 17.4416C11.9762 17.0614 11.7386 16.6336 11.7386 16.1584C11.7386 15.7782 11.596 15.398 11.5485 15.0178C11.5485 14.8277 11.5485 14.6376 11.5485 14.4475C11.5485 14.3524 11.5485 14.2574 11.501 14.1623C11.501 14.1148 11.501 14.0198 11.4535 14.0198L11.501 13.8772C11.501 13.8297 11.9287 13.8297 12.0713 13.8297C12.3089 13.8297 12.499 13.8297 12.7366 13.8772C13.2119 13.8772 13.5921 13.8772 14.0673 13.8297C15.0653 13.6871 15.4931 13.2594 15.7307 13.1168C16.6337 12.499 17.0614 11.4059 17.0614 11.4059C17.204 11.0732 17.204 10.4554 17.5366 10.2178C17.9168 9.88512 18.5347 9.93264 18.9624 9.74254C19.2 9.64749 19.3901 9.55244 19.6752 9.59997C19.8653 9.64749 20.198 9.88512 20.2931 9.55244C20.2455 9.50492 20.198 9.45739 20.1505 9.40987C20.5307 9.36234 20.1505 8.55442 20.0079 8.36432C19.7703 8.1267 19.4376 7.98413 19.0574 7.88908C18.5822 7.7465 18.1545 7.60393 17.7267 7.69898C16.9663 7.84155 17.0139 7.41383 16.5861 7.41383C16.0634 7.41383 15.1129 7.46135 14.9228 7.98412C14.8277 8.22175 14.7802 8.22175 14.6376 8.41185C14.5426 8.55442 14.6376 8.697 14.5901 8.8871C14.5426 9.07719 14.4475 9.74254 14.3525 9.98016C14.2099 10.3604 14.0198 10.8356 13.6871 10.8356C13.2119 10.8831 12.8317 10.9307 12.4515 10.7881C12.2139 10.693 11.8337 10.5505 11.6436 10.5029C10.7406 10.1227 10.598 9.74254 10.598 9.74254C10.503 9.59997 10.2653 9.31482 10.1703 8.98214C10.0752 8.60195 9.88515 8.3168 9.83762 8.1267C9.74257 7.9366 9.6 7.60393 9.45743 7.27125C9.26733 6.84353 9.0297 6.51086 8.8396 6.36828C8.55446 6.13066 8.31683 5.75046 7.74653 5.84551C7.65148 5.84551 7.27129 5.89304 6.98614 6.13066C6.79604 6.27323 6.74851 6.60591 6.55842 6.89106C6.46337 7.03363 6.27327 7.50888 6.13069 7.88908C6.03564 8.17422 5.98812 8.36432 5.84554 8.45937C5.75049 8.55442 5.65545 8.64947 5.51287 8.60195C5.41782 8.55442 5.32277 8.5069 5.22772 8.45937C5.08515 8.36432 4.8 7.84155 4.6099 7.50888C4.46733 7.1762 4.13465 6.70096 3.94455 6.46333C3.65941 6.08313 3.51683 5.98809 3.08911 5.98809C2.23366 5.98809 2.13861 6.46333 1.75842 7.1762C1.56832 7.50888 1.52079 7.98413 1.18812 8.36432C1.04554 8.55442 0.427723 9.45739 0 9.59997V16.1584V16.1109C0.0475248 16.0158 0.0475248 15.9208 0.0950495 15.8732C0.285149 15.5406 0.665346 15.2079 0.855445 14.8277C0.950495 14.6376 1.09307 14.4475 1.18812 14.2099C1.23564 14.0673 1.28317 13.7821 1.37822 13.6396C1.47327 13.4495 1.66337 13.4019 1.85347 13.3544C2.18614 13.3069 2.42376 13.7821 2.80396 13.9722C2.94653 14.0673 3.70693 14.3049 3.94455 14.3524C4.32475 14.4475 4.70495 14.495 5.08515 14.5901C5.27525 14.6376 5.46535 14.6376 5.70297 14.6851C5.89307 14.6851 6.60594 14.7326 6.60594 14.7802C6.27327 14.9703 6.03564 15.4455 5.89307 15.8257C5.75049 16.2059 5.65545 16.6336 5.51287 16.9663C5.32277 17.3465 4.94257 17.5366 4.9901 18.0118C4.9901 18.2019 5.03762 18.392 4.9901 18.5821C4.94257 18.8198 4.84752 18.9623 4.8 19.2C4.70495 19.4851 4.6099 20.3881 4.51485 20.6257L5.27525 20.5307C5.3703 20.3406 5.41782 19.4851 5.46535 19.3901C5.60792 18.9623 5.79802 18.6297 6.08317 18.297C6.36832 17.9643 6.36832 17.5841 6.51089 17.2039C6.70099 16.7762 6.93861 16.4911 7.17624 16.1109C7.60396 15.4455 7.88911 14.5425 8.74455 14.3524C8.8396 14.3524 9.36238 14.7326 9.6 14.9703C9.88515 15.2554 10.1703 15.5406 10.3604 15.9208C10.6931 16.6336 11.0257 17.6792 11.1208 18.2019C11.1683 18.5346 11.2158 18.5346 11.4535 18.8198C11.5485 18.9148 11.7386 19.295 11.8337 19.4376C11.8812 19.5802 12.0238 19.9128 12.0713 20.1029C12.1188 20.198 12.2614 20.5307 12.3564 20.8158H13.0693C12.7842 20.0079 12.5465 19.2 12.4515 18.392Z" fill="transparent"/> <path d="M12.0714 20.0554C11.9764 19.8653 11.8813 19.5327 11.8338 19.3901C11.7863 19.2475 11.5486 18.8673 11.4536 18.7723C11.216 18.5346 11.1684 18.4871 11.1209 18.1544C11.0259 17.5841 10.6932 16.5386 10.3605 15.8732C10.1704 15.4931 9.88526 15.2079 9.60011 14.9228C9.36249 14.6851 8.83972 14.3049 8.74467 14.3049C7.8417 14.495 7.60407 15.3505 7.17635 16.0633C6.93873 16.4435 6.7011 16.7762 6.511 17.1564C6.3209 17.5366 6.36843 17.9643 6.08328 18.2495C5.79813 18.5822 5.60803 18.9148 5.46546 19.3426C5.41793 19.4376 5.37041 20.2931 5.27536 20.4831L6.60605 20.3881C7.8417 20.4832 7.4615 20.9584 9.41001 20.8633L12.4516 20.7683C12.2615 20.4832 12.1189 20.1505 12.0714 20.0554Z" fill="currentColor"/> <path d="M20.9109 0H2.99406C1.33069 0 0 1.37822 0 3.04158V9.64752C0.427723 9.45743 1.04554 8.55446 1.23564 8.31683C1.56832 7.93663 1.61584 7.41386 1.80594 7.12871C2.18614 6.41584 2.28119 5.94059 3.13663 5.94059C3.56436 5.94059 3.70693 6.03564 3.99208 6.41584C4.18218 6.65347 4.51485 7.12871 4.65743 7.41386C4.84752 7.79406 5.13267 8.26931 5.27525 8.36436C5.3703 8.45941 5.46535 8.50693 5.5604 8.50693C5.70297 8.55446 5.79802 8.45941 5.89307 8.36436C6.03564 8.26931 6.08317 8.07921 6.17822 7.79406C6.32079 7.41386 6.51089 6.93861 6.60594 6.79604C6.79604 6.51089 6.84356 6.17822 7.03366 6.03564C7.31881 5.79802 7.65149 5.79802 7.79406 5.7505C8.36436 5.65545 8.60198 6.03564 8.88713 6.27327C9.07723 6.41584 9.31485 6.74852 9.50495 7.17624C9.64753 7.50891 9.83762 7.84158 9.88515 8.03168C9.93267 8.22178 10.1228 8.50693 10.2178 8.88713C10.3129 9.2198 10.5505 9.45743 10.6455 9.64752C10.6455 9.64752 10.7881 10.0752 11.6911 10.4079C11.8812 10.503 12.2614 10.598 12.499 10.6931C12.8792 10.8356 13.2594 10.8356 13.7347 10.7406C14.0673 10.7406 14.2574 10.2653 14.4 9.88515C14.4951 9.64752 14.5901 8.98218 14.6376 8.79208C14.6851 8.60198 14.5426 8.45941 14.6851 8.31683C14.8277 8.12673 14.8752 8.12673 14.9703 7.88911C15.1129 7.36634 16.1109 7.31881 16.6337 7.31881C17.0614 7.31881 17.0139 7.74653 17.7743 7.60396C18.202 7.50891 18.6297 7.65149 19.105 7.79406C19.4851 7.88911 19.8653 8.03168 20.0554 8.26931C20.198 8.41188 20.5307 9.26733 20.198 9.31485C20.2455 9.36238 20.2455 9.4099 20.3406 9.45743C20.2455 9.7901 19.9129 9.55248 19.7228 9.50495C19.4851 9.45743 19.2951 9.50495 19.0099 9.64752C18.5822 9.83762 17.9168 9.83762 17.5842 10.1228C17.2515 10.4079 17.2515 10.9782 17.1089 11.3109C17.1089 11.3109 16.6812 12.404 15.7782 13.0218C15.5406 13.2119 15.1129 13.5921 14.1149 13.7347C13.6871 13.7822 13.2594 13.8297 12.7842 13.7822C12.5465 13.7822 12.3564 13.7822 12.1188 13.7347C11.9762 13.7347 11.5485 13.7347 11.5485 13.7822L11.501 13.9248C11.501 13.9723 11.501 14.0673 11.5485 14.0673C11.5485 14.1624 11.5485 14.2574 11.596 14.3525C11.596 14.5426 11.596 14.7327 11.596 14.9228C11.596 15.303 11.7386 15.6832 11.7861 16.0634C11.7861 16.4911 12.0238 16.9663 12.2139 17.3465C12.3089 17.4891 12.404 17.4891 12.4515 17.6792C12.499 17.8693 12.4515 18.0594 12.499 18.297C12.5941 19.105 12.8317 19.9129 13.2119 20.6733C13.6396 20.5782 14.1149 20.4356 14.6851 20.3406C15.7307 20.198 17.204 20.2455 18.1545 20.198C20.5307 19.9604 21.8614 21.196 24 20.6733V3.04158C23.9525 1.37822 22.6218 0 20.9109 0Z" fill="currentColor"/> <path d="M5.51287 16.9663C5.70297 16.5861 5.79802 16.2059 5.89307 15.8257C6.03564 15.4455 6.22574 14.9702 6.60594 14.7801C6.55842 14.7326 5.84554 14.6851 5.70297 14.6851C5.51287 14.6851 5.32277 14.6376 5.08515 14.59C4.70495 14.495 4.27723 14.4475 3.94455 14.3524C3.70693 14.3049 2.99406 14.0197 2.80396 13.9722C2.42376 13.7821 2.18614 13.3069 1.85347 13.3544C1.66337 13.4019 1.47327 13.4494 1.37822 13.6395C1.28317 13.7821 1.23564 14.0673 1.18812 14.2574C1.09307 14.4475 0.99802 14.6851 0.855446 14.8752C0.617822 15.2554 0.237624 15.5881 0.0950495 15.9207C0.0475248 16.0158 0.0475248 16.0633 0 16.1584V20.2455C0.190099 20.293 0.380198 20.3405 0.617822 20.3881C2.28119 20.8158 2.70891 20.8633 4.37228 20.6732H4.51485C4.65743 20.3881 4.75248 19.5326 4.8 19.2475C4.84752 19.0574 4.94257 18.8673 4.9901 18.6296C5.03762 18.4395 4.9901 18.2494 4.9901 18.0593C4.94257 17.5366 5.32277 17.3465 5.51287 16.9663Z" fill="currentColor"/> </svg> </span> <p class="flex-grow"> <span>Install OCaml 5.3.0</span></p> <span class="ml-2"><svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4" /> </svg> </span> </a> <a href="/api" class="group whitespace-nowrap h-16 flex p-4 px-5 w-full items-center bg-white dark:bg-dark-card hover:bg-primary dark:hover:bg-dark-primary hover:text-white dark:hover:text-dark-title drop-shadow hover:drop-shadow-xl border-primary dark:border-dark-primary border-[3px] rounded-lg text-title dark:text-dark-title "> <span class="group-hover:text-white dark:group-hover:text-dark-title text-primary dark:text-dark-primary mr-2"><svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path d="M2.46875 15.1935L2.5293 4.46692H1.31836V18.1154C2.98242 17.6857 4.65234 17.4122 6.33398 17.4005C7.88672 17.3908 9.43945 17.6075 10.9961 18.1349C10.0293 17.3517 8.95117 16.7755 7.80078 16.4005C6.35156 15.9279 4.78516 15.7716 3.17969 15.9083C2.81641 15.9376 2.5 15.6681 2.46875 15.3068C2.46484 15.2677 2.46484 15.2306 2.46875 15.1935ZM20.2383 3.90638C20.2344 3.87513 20.2305 3.84192 20.2305 3.80677C20.2305 3.77356 20.2324 3.74036 20.2383 3.70716V1.53528C18.7148 1.39075 17.1445 1.55872 15.7734 2.07825C14.4922 2.56458 13.3867 3.36341 12.668 4.50794V16.879C13.7852 16.1329 14.9277 15.5197 16.1016 15.1017C17.4395 14.6251 18.8145 14.3986 20.2383 14.5118V3.90638ZM21.5566 3.14856H23.3418C23.7051 3.14856 24 3.44349 24 3.80677V18.9747C24 19.338 23.7051 19.6329 23.3418 19.6329C23.2676 19.6329 23.1953 19.6212 23.1289 19.5978C21.293 19.0724 19.4688 18.7228 17.6621 18.7111C15.9004 18.6993 14.1406 19.0099 12.373 19.7892C12.2637 19.8615 12.1328 19.9005 11.998 19.8986C11.8652 19.9005 11.7344 19.8615 11.623 19.7892C9.85742 19.0079 8.0957 18.6993 6.33398 18.7111C4.52734 18.7228 2.70508 19.0724 0.867188 19.5978C0.800781 19.6212 0.728516 19.6329 0.654297 19.6329C0.294922 19.6349 0 19.34 0 18.9767V3.80677C0 3.44349 0.294922 3.14856 0.658203 3.14856H2.53516L2.54688 0.949345C2.54883 0.632939 2.77148 0.37122 3.07031 0.30872C4.80273 -0.0526083 6.9082 0.0372355 8.75391 0.744267C10.0293 1.23255 11.1875 2.01184 12.0332 3.13685C12.8867 2.08802 14.0273 1.33411 15.3105 0.847782C17.0645 0.181767 19.0879 0.0216105 20.9922 0.300907C21.3203 0.347782 21.5547 0.630986 21.5547 0.951298V3.14856H21.5566ZM13.3066 18.0353C14.7617 17.5783 16.2148 17.3908 17.668 17.3986C19.3496 17.4083 21.0195 17.6837 22.6836 18.1134V4.46692H21.5566V15.2521C21.5566 15.6154 21.2617 15.9103 20.8984 15.9103C20.8457 15.9103 20.7949 15.9044 20.7461 15.8927C19.3047 15.6661 17.9082 15.8536 16.5449 16.34C15.4473 16.7325 14.3691 17.3185 13.3066 18.0353ZM11.3516 16.7521V4.48841C10.6621 3.27161 9.54688 2.45716 8.28711 1.97474C6.85938 1.42786 5.25586 1.30481 3.85742 1.50403L3.7832 14.5529C5.30859 14.4982 6.80078 14.6915 8.20508 15.1505C9.32227 15.5138 10.3809 16.047 11.3516 16.7521Z" fill="currentColor"/> </svg> </span> <p class="flex-grow"> <span>Standard Library API</span></p> <span class="ml-2"><svg xmlns="http://www.w3.org/2000/svg" fill="none" class="w-5 h-5" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" class="size-6"> <path stroke-linecap="round" stroke-linejoin="round" d="M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244" /> </svg> </span> </a> <a href="/manual" class="group whitespace-nowrap h-16 flex p-4 px-5 w-full items-center bg-white dark:bg-dark-card hover:bg-primary dark:hover:bg-dark-primary hover:text-white dark:hover:text-dark-title drop-shadow hover:drop-shadow-xl border-primary dark:border-dark-primary border-[3px] rounded-lg text-title dark:text-dark-title "> <span class="group-hover:text-white dark:group-hover:text-dark-title text-primary dark:text-dark-primary mr-2"><svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path d="M2.46875 15.1935L2.5293 4.46692H1.31836V18.1154C2.98242 17.6857 4.65234 17.4122 6.33398 17.4005C7.88672 17.3908 9.43945 17.6075 10.9961 18.1349C10.0293 17.3517 8.95117 16.7755 7.80078 16.4005C6.35156 15.9279 4.78516 15.7716 3.17969 15.9083C2.81641 15.9376 2.5 15.6681 2.46875 15.3068C2.46484 15.2677 2.46484 15.2306 2.46875 15.1935ZM20.2383 3.90638C20.2344 3.87513 20.2305 3.84192 20.2305 3.80677C20.2305 3.77356 20.2324 3.74036 20.2383 3.70716V1.53528C18.7148 1.39075 17.1445 1.55872 15.7734 2.07825C14.4922 2.56458 13.3867 3.36341 12.668 4.50794V16.879C13.7852 16.1329 14.9277 15.5197 16.1016 15.1017C17.4395 14.6251 18.8145 14.3986 20.2383 14.5118V3.90638ZM21.5566 3.14856H23.3418C23.7051 3.14856 24 3.44349 24 3.80677V18.9747C24 19.338 23.7051 19.6329 23.3418 19.6329C23.2676 19.6329 23.1953 19.6212 23.1289 19.5978C21.293 19.0724 19.4688 18.7228 17.6621 18.7111C15.9004 18.6993 14.1406 19.0099 12.373 19.7892C12.2637 19.8615 12.1328 19.9005 11.998 19.8986C11.8652 19.9005 11.7344 19.8615 11.623 19.7892C9.85742 19.0079 8.0957 18.6993 6.33398 18.7111C4.52734 18.7228 2.70508 19.0724 0.867188 19.5978C0.800781 19.6212 0.728516 19.6329 0.654297 19.6329C0.294922 19.6349 0 19.34 0 18.9767V3.80677C0 3.44349 0.294922 3.14856 0.658203 3.14856H2.53516L2.54688 0.949345C2.54883 0.632939 2.77148 0.37122 3.07031 0.30872C4.80273 -0.0526083 6.9082 0.0372355 8.75391 0.744267C10.0293 1.23255 11.1875 2.01184 12.0332 3.13685C12.8867 2.08802 14.0273 1.33411 15.3105 0.847782C17.0645 0.181767 19.0879 0.0216105 20.9922 0.300907C21.3203 0.347782 21.5547 0.630986 21.5547 0.951298V3.14856H21.5566ZM13.3066 18.0353C14.7617 17.5783 16.2148 17.3908 17.668 17.3986C19.3496 17.4083 21.0195 17.6837 22.6836 18.1134V4.46692H21.5566V15.2521C21.5566 15.6154 21.2617 15.9103 20.8984 15.9103C20.8457 15.9103 20.7949 15.9044 20.7461 15.8927C19.3047 15.6661 17.9082 15.8536 16.5449 16.34C15.4473 16.7325 14.3691 17.3185 13.3066 18.0353ZM11.3516 16.7521V4.48841C10.6621 3.27161 9.54688 2.45716 8.28711 1.97474C6.85938 1.42786 5.25586 1.30481 3.85742 1.50403L3.7832 14.5529C5.30859 14.4982 6.80078 14.6915 8.20508 15.1505C9.32227 15.5138 10.3809 16.047 11.3516 16.7521Z" fill="currentColor"/> </svg> </span> <p class="flex-grow"> <span>OCaml Language Manual</span></p> <span class="ml-2"><svg xmlns="http://www.w3.org/2000/svg" fill="none" class="w-5 h-5" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" class="size-6"> <path stroke-linecap="round" stroke-linejoin="round" d="M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244" /> </svg> </span> </a> </div> </div> </div> <div class="w-full bg:white dark:bg-dark-background_navigation border-b border-color-separator_20 dark:border-color-separator_30"> <div class="container-fluid"> <div class="hidden md:grid md:gap-6 md:grid-cols-3"> <a href="#beginner_section" class="py-3 lg:py-6 flex items-center gap-2 text-secondary dark:text-dark-secondary font-bold hover:underline"> <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"> <circle cx="10" cy="10" r="10" class="fill-secondary dark:fill-dark-secondary"/> </svg> <span class="hidden lg:inline">Jump to</span> Beginner Section <svg width="18" height="32" viewBox="0 0 18 32" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M13 16.6L9 20.6M9 20.6L5 16.6M9 20.6V11" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> </svg> </a> <a href="#intermediate_section" class="py-3 lg:py-6 flex items-center gap-2 text-tertiary dark:text-dark-tertiary font-bold hover:underline"> <svg width="25" height="25" viewBox="0 0 25 25" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M0.5 6.5C0.5 3.18629 3.18629 0.5 6.5 0.5H18.5C21.8137 0.5 24.5 3.18629 24.5 6.5V18.5C24.5 21.8137 21.8137 24.5 18.5 24.5H6.5C3.18629 24.5 0.5 21.8137 0.5 18.5V6.5Z" class="fill-tertiary dark:fill-dark-tertiary"/> </svg> <span class="hidden lg:inline">Jump to</span> Intermediate Section <svg width="18" height="32" viewBox="0 0 18 32" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M13 16.6L9 20.6M9 20.6L5 16.6M9 20.6V11" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> </svg> </a> <a href="#advanced_section" class="py-3 lg:py-6 flex items-center gap-2 text-primary dark:text-dark-primary font-bold hover:underline"> <svg width="26" height="23" viewBox="0 0 26 23" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M11.268 1.5C12.0378 0.166665 13.9622 0.166667 14.7321 1.5L25.1244 19.5C25.8942 20.8333 24.9319 22.5 23.3923 22.5H2.60769C1.06809 22.5 0.105844 20.8333 0.875645 19.5L11.268 1.5Z" class="fill-primary dark:fill-dark-primary"/> </svg> <span class="hidden lg:inline">Jump to</span> Advanced Section <svg width="18" height="32" viewBox="0 0 18 32" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M13 16.6L9 20.6M9 20.6L5 16.6M9 20.6V11" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> </svg> </a> </div> </div> </div> <div class="container-fluid"> <h2 id="beginner_section" class="mt-16 mb-8 text-content dark:text-dark-title text-3xl font-regular leading-9 tracking-widest"> <span class="text-secondary dark:text-dark-secondary font-bold">FOUNDATIONS</span> FOR BEGINNERS </h2> <div class="grid gap-6 md:gap-10 mt-6 md:grid-cols-2"> <div class="md:h-full"> <div class="max-w-sm md:h-full md:max-w-full md:w-[32rem] flex flex-col"> <div class="pt-4 text-content dark:text-dark-content text-sm font-medium leading-7 tracking-widest flex gap-2 items-center"> <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"> <circle cx="10" cy="10" r="10" class="fill-secondary dark:fill-dark-secondary"/> </svg> GET STARTED </div> <h2 class="overflow-hidden mt-2 text-title dark:text-dark-title text-2xl font-bold leading-7">Introduction To OCaml</h2> <div class="mt-4 text-content dark:text-dark-content text-base font-normal h-14 text-ellipsis overflow-hidden leading-7 max-w-prose"> Install OCaml and gain a high-level understanding of the language </div> <ul class="flex flex-col grow gap-4 mt-5 md:h-60"> <li class="w-full"> <a href="/docs/installing-ocaml" class="bg-white dark:bg-dark-card text-title dark:text-dark-title hover:bg-primary dark:hover:bg-dark-primary hover:text-white dark:hover:text-dark-title drop-shadow hover:drop-shadow-xl flex gap-2 border-primary dark:border-dark-primary border-2 rounded-lg p-2.5 text-md font-bold"> <span class="grow">Installing OCaml</span> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" d="M12.75 15l3-3m0 0l-3-3m3 3h-7.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /> </svg> </a> </li> <li class="w-full"> <a href="/docs/tour-of-ocaml" class="bg-white dark:bg-dark-card text-title dark:text-dark-title hover:bg-primary dark:hover:bg-dark-primary hover:text-white dark:hover:text-dark-title drop-shadow hover:drop-shadow-xl flex gap-2 border-primary dark:border-dark-primary border-2 rounded-lg p-2.5 text-md font-bold"> <span class="grow">A Tour of OCaml</span> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" d="M12.75 15l3-3m0 0l-3-3m3 3h-7.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /> </svg> </a> </li> <li class="w-full"> <a href="/docs/your-first-program" class="bg-white dark:bg-dark-card text-title dark:text-dark-title hover:bg-primary dark:hover:bg-dark-primary hover:text-white dark:hover:text-dark-title drop-shadow hover:drop-shadow-xl flex gap-2 border-primary dark:border-dark-primary border-2 rounded-lg p-2.5 text-md font-bold"> <span class="grow">Your First OCaml Program</span> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" d="M12.75 15l3-3m0 0l-3-3m3 3h-7.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /> </svg> </a> </li> <li class="w-full"> <a href="/docs/opam-switch-introduction" class="bg-white dark:bg-dark-card text-title dark:text-dark-title hover:bg-primary dark:hover:bg-dark-primary hover:text-white dark:hover:text-dark-title drop-shadow hover:drop-shadow-xl flex gap-2 border-primary dark:border-dark-primary border-2 rounded-lg p-2.5 text-md font-bold"> <span class="grow">Introduction to opam Switches</span> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" d="M12.75 15l3-3m0 0l-3-3m3 3h-7.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /> </svg> </a> </li> </ul> <a href="/docs/get-started" class="mt-4 text-primary dark:text-dark-title hover:underline dark:hover:text-dark-primary dark:underline items-center leading-10"> Get Started </a> </div> </div> <div class="md:h-full"> <div class="max-w-sm md:h-full md:max-w-full md:w-[32rem] flex flex-col"> <div class="pt-4 text-content dark:text-dark-content text-sm font-medium leading-7 tracking-widest flex gap-2 items-center"> <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"> <circle cx="10" cy="10" r="10" class="fill-secondary dark:fill-dark-secondary"/> </svg> LANGUAGE </div> <h2 class="overflow-hidden mt-2 text-title dark:text-dark-title text-2xl font-bold leading-7">The OCaml Language</h2> <div class="mt-4 text-content dark:text-dark-content text-base font-normal h-14 text-ellipsis overflow-hidden leading-7 max-w-prose"> An in-depth explanation of language features and data structures from the Standard Library </div> <ul class="flex flex-col grow gap-4 mt-5 md:h-60"> <li class="w-full"> <a href="/docs/values-and-functions" class="bg-white dark:bg-dark-card text-title dark:text-dark-title hover:bg-primary dark:hover:bg-dark-primary hover:text-white dark:hover:text-dark-title drop-shadow hover:drop-shadow-xl flex gap-2 border-primary dark:border-dark-primary border-2 rounded-lg p-2.5 text-md font-bold"> <span class="grow">Values and Functions</span> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" d="M12.75 15l3-3m0 0l-3-3m3 3h-7.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /> </svg> </a> </li> <li class="w-full"> <a href="/docs/basic-data-types" class="bg-white dark:bg-dark-card text-title dark:text-dark-title hover:bg-primary dark:hover:bg-dark-primary hover:text-white dark:hover:text-dark-title drop-shadow hover:drop-shadow-xl flex gap-2 border-primary dark:border-dark-primary border-2 rounded-lg p-2.5 text-md font-bold"> <span class="grow">Data Types and Pattern Matching</span> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" d="M12.75 15l3-3m0 0l-3-3m3 3h-7.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /> </svg> </a> </li> <li class="w-full"> <a href="/docs/lists" class="bg-white dark:bg-dark-card text-title dark:text-dark-title hover:bg-primary dark:hover:bg-dark-primary hover:text-white dark:hover:text-dark-title drop-shadow hover:drop-shadow-xl flex gap-2 border-primary dark:border-dark-primary border-2 rounded-lg p-2.5 text-md font-bold"> <span class="grow">Lists</span> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" d="M12.75 15l3-3m0 0l-3-3m3 3h-7.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /> </svg> </a> </li> <li class="w-full"> <a href="/docs/loops-recursion" class="bg-white dark:bg-dark-card text-title dark:text-dark-title hover:bg-primary dark:hover:bg-dark-primary hover:text-white dark:hover:text-dark-title drop-shadow hover:drop-shadow-xl flex gap-2 border-primary dark:border-dark-primary border-2 rounded-lg p-2.5 text-md font-bold"> <span class="grow">Loops and Recursions</span> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" d="M12.75 15l3-3m0 0l-3-3m3 3h-7.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /> </svg> </a> </li> </ul> <a href="/docs/language" class="mt-4 text-primary dark:text-dark-title hover:underline dark:hover:text-dark-primary dark:underline items-center leading-10"> Language Documentation </a> </div> </div> </div> <div class="border-t border-separator_30 dark:border-dark-separator_30 my-6"></div> <div class="grid gap-6 mt-6 lg:grid-cols-2"> <div class="md:h-full"> <div class="max-w-sm md:h-full md:max-w-full md:w-[32rem] flex flex-col"> <div class="pt-4 text-content dark:text-dark-content text-sm font-medium leading-7 tracking-widest flex gap-2 items-center"> <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"> <circle cx="10" cy="10" r="10" class="fill-secondary dark:fill-dark-secondary"/> </svg> RECOMMENDED BOOK </div> <h2 class="overflow-hidden mt-2 text-title dark:text-dark-title text-2xl font-bold leading-7">OCaml Programming: Correct + Efficient + Beautiful</h2> <div class="grow mt-6 grid grid-cols-1 md:grid-cols-2 gap-6 pt-6"> <div class="flex flex-col"> <a href="https://cs3110.github.io/textbook/" target="_blank"> <div class="relative"> <div class="absolute -mt-8 ml-3 w-16 h-16"> <div class="bg-primary dark:bg-dark-primary rotate-[-10deg] rounded-full w-16 h-16 flex items-center justify-center" style="filter: drop-shadow(-4px -2px 4px rgb(0 0 0 / 0.25));"> <div class="text-center text-white text-base font-bold leading-7 tracking-wide"> FREE </div> </div> </div> <img src="/media/_/NDE4NjEzZjUxYzA3MTVhOGZjMWI1YTg0MGY3NGZlY2M/books/ocaml-programming-cs3110.jpg" class="w-full border z-10" alt=""> </div> </a> </div> <div> <div class="px-3 inline-block bg-secondary dark:bg-dark-secondary rounded-3xl font-semibold text-center text-white dark:text-dark-title tracking-widest"> Beginner </div> <p class="mt-2 text-content dark:text-dark-content text-sm font-normal whitespace-normal max-w-prose"> This textbook, used in a third-semester Cornell course, teaches functional programming and data structures in OCaml, emphasizing semantics and software engineering. Suitable for students with Python and Java backgrounds, it requires some imperative language skills and basic discrete mathematics. The book includes over 200 YouTube videos as supplementary or alternative learning resources. </p> <div class="pt-4"> <a href="https://cs3110.github.io/textbook/" class="flex gap-2 text-primary dark:text-dark-title hover:underline dark:hover:text-dark-primary items-center leading-8" target="_blank">Read Online <svg xmlns="http://www.w3.org/2000/svg" fill="none" class="h-4 w-4" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" class="size-6"> <path stroke-linecap="round" stroke-linejoin="round" d="M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244" /> </svg> </a> </div> </div> </div> <a href="/books" class="pt-6 w-max text-primary dark:text-dark-title hover:underline dark:underline hover:text-primary dark:hover:text-dark-primary items-center leading-10"> See More Books </a> </div> </div> <div class="md:h-full"> <div class="max-w-sm md:h-full md:max-w-full md:w-[32rem] flex flex-col"> <div class="pt-4 text-content dark:text-dark-content text-sm font-medium leading-7 tracking-widest flex gap-2 items-center"> <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"> <circle cx="10" cy="10" r="10" class="fill-secondary dark:fill-dark-secondary"/> </svg> RECOMMENDED BOOK </div> <h2 class="overflow-hidden mt-2 text-title dark:text-dark-title text-2xl font-bold leading-7">OCaml From the Very Beginning</h2> <div class="grow mt-6 grid grid-cols-1 md:grid-cols-2 gap-6 pt-6"> <div class="flex flex-col"> <a href="https://ocaml-book.com/" target="_blank"> <div class="relative"> <div class="absolute -mt-8 ml-3 w-16 h-16"> <div class="bg-primary dark:bg-dark-primary rotate-[-10deg] rounded-full w-16 h-16 flex items-center justify-center" style="filter: drop-shadow(-4px -2px 4px rgb(0 0 0 / 0.25));"> <div class="text-center text-white text-base font-bold leading-7 tracking-wide"> FREE </div> </div> </div> <img src="/media/_/ZGZjM2JiMzVhZmYzMmIzYjNmMTAyMWFiYmVmMTRiZjg/books/ocaml-from-the-very-beginning.jpg" class="w-full border z-10" alt=""> </div> </a> </div> <div> <div class="px-3 inline-block bg-secondary dark:bg-dark-secondary rounded-3xl font-semibold text-center text-white dark:text-dark-title tracking-widest"> Beginner </div> <p class="mt-2 text-content dark:text-dark-content text-sm font-normal whitespace-normal max-w-prose"> John Whitington's "OCaml from the Very Beginning" is a beginner-friendly guide to learning OCaml, a modern programming language. The book gradually introduces concepts in concise chapters, with exercises and answers. It's suitable for both novice and experienced programmers, and can be used in academic settings or for self-study. </p> <div class="pt-4"> <a href="https://ocaml-book.com/" class="flex gap-2 text-primary dark:text-dark-title hover:underline dark:hover:text-dark-primary items-center leading-8" target="_blank">Read Online <svg xmlns="http://www.w3.org/2000/svg" fill="none" class="h-4 w-4" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" class="size-6"> <path stroke-linecap="round" stroke-linejoin="round" d="M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244" /> </svg> </a> <a href="https://www.amazon.com/gp/product/0957671105" class="flex gap-2 text-primary dark:text-dark-title hover:underline dark:hover:text-dark-primary items-center leading-8" target="_blank">Buy on Amazon <svg xmlns="http://www.w3.org/2000/svg" fill="none" class="h-4 w-4" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" class="size-6"> <path stroke-linecap="round" stroke-linejoin="round" d="M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244" /> </svg> </a> </div> </div> </div> <a href="/books" class="pt-6 w-max text-primary dark:text-dark-title hover:underline dark:underline hover:text-primary dark:hover:text-dark-primary items-center leading-10"> See More Books </a> </div> </div> </div> <div class="border-t border-separator_30 dark:border-dark-separator_30 my-6"></div> <div class="mt-6 mb-10"> <div class="bg-background dark:bg-dark-background flex flex-col"> <div class="max-w-sm md:max-w-full lg:w-full flex flex-col"> <div class="pt-4 text-content dark:text-dark-content text-sm font-medium leading-7 tracking-widest flex gap-2 items-center"> <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"> <circle cx="10" cy="10" r="10" class="fill-secondary dark:fill-dark-secondary"/> </svg> EXERCISES </div> <h2 class="overflow-hidden mt-2 text-title dark:text-dark-title text-2xl font-bold leading-7">Exercises for Beginners</h2> <div class="mt-6 grid gap-6 md:gap-10 md:grid-cols-2 lg:grid-cols-4"> <a class="flex flex-col p-5 card dark:dark-card" href="/exercises#1"> <div class="flex-grow dark:text-dark-title"> Write a function that returns the last element of a list. </div> <div class="my-2.5"> <div class="px-3 inline-block bg-secondary dark:bg-dark-secondary rounded-3xl font-semibold text-center text-white dark:text-dark-title tracking-widest"> Beginner </div> </div> </a> <a class="flex flex-col p-5 card dark:dark-card" href="/exercises#5"> <div class="flex-grow dark:text-dark-title"> Write a function to reverse a list. </div> <div class="my-2.5"> <div class="px-3 inline-block bg-secondary dark:bg-dark-secondary rounded-3xl font-semibold text-center text-white dark:text-dark-title tracking-widest"> Beginner </div> </div> </a> <a class="flex flex-col p-5 card dark:dark-card" href="/exercises#6"> <div class="flex-grow dark:text-dark-title"> Find out whether a list is a palindrome. </div> <div class="my-2.5"> <div class="px-3 inline-block bg-secondary dark:bg-dark-secondary rounded-3xl font-semibold text-center text-white dark:text-dark-title tracking-widest"> Beginner </div> </div> </a> <a class="flex flex-col p-5 card dark:dark-card" href="/exercises#8"> <div class="flex-grow dark:text-dark-title"> Eliminate consecutive duplicates of list elements. </div> <div class="my-2.5"> <div class="px-3 inline-block bg-tertiary dark:bg-dark-tertiary_lighter rounded-3xl font-semibold text-center text-white dark:text-dark-title tracking-widest"> Intermediate </div> </div> </a> </div> </div> <a href="/exercises" class="pt-4 text-primary dark:text-dark-title hover:underline dark:underline hover:text-primary dark:hover:text-dark-primary items-center leading-10"> View all Exercises </a> </div> </div> </div> <div class="section-mild-contrast dark-section-strong-contrast"> <div class="container-fluid flex flex-col py-9"> <div class="pt-4 text-content dark:text-dark-content text-sm font-medium leading-7 tracking-widest flex gap-2 items-center"> PLATFORM TOOLS </div> <h2 class="overflow-hidden mt-2 text-title dark:text-dark-title text-2xl font-bold leading-7">The OCaml Platform</h2> <div class="mt-10 flex flex-col md:flex-row gap-10"> <a class="group p-5 flex flex-col card dark:bg-dark-card max-w-[32rem]" href="https://opam.ocaml.org"> <h3 class="flex gap-3 text-black dark:text-dark-title text-base font-bold"> <img src="/_/NGE3OGFhOTAyNzdlYmNiOWUyZDcyOTE0MWY2NjZlNGU/img/learn/opam_logo.png" alt=""> opam </h3> <p class="text-content dark:text-dark-content py-6"> OCaml's package manager for managing OCaml compilers and libraries </p> <div class="flex gap-2 items-center text-sm text-primary hover:text-primary dark:text-dark-title dark:hover:text-dark-primary"> Get Started <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" d="M12.75 15l3-3m0 0l-3-3m3 3h-7.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /> </svg> </div> </a> <a class="group p-5 flex flex-col card dark:bg-dark-card max-w-[32rem]" href="https://dune.build/"> <h3 class="flex gap-3 text-black dark:text-dark-title text-base font-bold"> <img src="/_/ZmRkNjIzZDcxMDQ5ZjI3MWM1OGU4NGYwYzJkYjg1NjY/img/learn/dune_logo.svg" alt=""> Dune </h3> <p class="text-content dark:text-dark-content py-6"> Dune is a user-friendly and efficient build system for developing OCaml projects </p> <div class="flex gap-2 items-center text-sm text-primary hover:text-primary dark:text-dark-title dark:hover:text-dark-primary"> Get Started <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" d="M12.75 15l3-3m0 0l-3-3m3 3h-7.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /> </svg> </div> </a> </div> <a class="pt-6 pb-3 text-primary dark:text-dark-title hover:underline dark:underline dark:hover:text-dark-primary" href="/docs/tools">Go to Platform Tools Documentation</a> </div> </div> <div class="container-fluid"> <h2 id="intermediate_section" class="mt-16 mb-8 text-content dark:text-dark-title text-3xl font-regular leading-9 tracking-widest"> <span class="text-tertiary dark:text-dark-tertiary font-bold">EXPLORING</span> THE INTERMEDIATE LEVEL </h2> <div class="grid gap-6 md:gap-10 mt-6 md:grid-cols-2"> <div class="md:h-full"> <div class="max-w-sm md:h-full md:max-w-full md:w-[32rem] flex flex-col"> <div class="pt-4 text-content dark:text-dark-content text-sm font-medium leading-7 tracking-widest flex gap-2 items-center"> <svg width="25" height="25" viewBox="0 0 25 25" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M0.5 6.5C0.5 3.18629 3.18629 0.5 6.5 0.5H18.5C21.8137 0.5 24.5 3.18629 24.5 6.5V18.5C24.5 21.8137 21.8137 24.5 18.5 24.5H6.5C3.18629 24.5 0.5 21.8137 0.5 18.5V6.5Z" class="fill-tertiary dark:fill-dark-tertiary"/> </svg> GUIDES </div> <h2 class="overflow-hidden mt-2 text-title dark:text-dark-title text-2xl font-bold leading-7">Practical-Minded Tutorials and Guides</h2> <div class="mt-4 text-content dark:text-dark-content text-base font-normal h-14 text-ellipsis overflow-hidden leading-7 max-w-prose"> How to solve real-world problems in OCaml </div> <ul class="flex flex-col grow gap-4 mt-5 md:h-60"> <li class="w-full"> <a href="/docs/formatting-text" class="bg-white dark:bg-dark-card text-title dark:text-dark-title hover:bg-primary dark:hover:bg-dark-primary hover:text-white dark:hover:text-dark-title drop-shadow hover:drop-shadow-xl flex gap-2 border-primary dark:border-dark-primary border-2 rounded-lg p-2.5 text-md font-bold"> <span class="grow">Formatting and Wrapping Text</span> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" d="M12.75 15l3-3m0 0l-3-3m3 3h-7.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /> </svg> </a> </li> <li class="w-full"> <a href="/docs/debugging" class="bg-white dark:bg-dark-card text-title dark:text-dark-title hover:bg-primary dark:hover:bg-dark-primary hover:text-white dark:hover:text-dark-title drop-shadow hover:drop-shadow-xl flex gap-2 border-primary dark:border-dark-primary border-2 rounded-lg p-2.5 text-md font-bold"> <span class="grow">Debugging</span> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" d="M12.75 15l3-3m0 0l-3-3m3 3h-7.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /> </svg> </a> </li> <li class="w-full"> <a href="/docs/error-handling" class="bg-white dark:bg-dark-card text-title dark:text-dark-title hover:bg-primary dark:hover:bg-dark-primary hover:text-white dark:hover:text-dark-title drop-shadow hover:drop-shadow-xl flex gap-2 border-primary dark:border-dark-primary border-2 rounded-lg p-2.5 text-md font-bold"> <span class="grow">Error Handling</span> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" d="M12.75 15l3-3m0 0l-3-3m3 3h-7.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /> </svg> </a> </li> <li class="w-full"> <a href="/docs/profiling" class="bg-white dark:bg-dark-card text-title dark:text-dark-title hover:bg-primary dark:hover:bg-dark-primary hover:text-white dark:hover:text-dark-title drop-shadow hover:drop-shadow-xl flex gap-2 border-primary dark:border-dark-primary border-2 rounded-lg p-2.5 text-md font-bold"> <span class="grow">Profiling</span> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" d="M12.75 15l3-3m0 0l-3-3m3 3h-7.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /> </svg> </a> </li> </ul> <a href="/docs/guides" class="mt-4 text-primary dark:text-dark-title hover:underline dark:hover:text-dark-primary dark:underline items-center leading-10"> See More Guides </a> </div> </div> <div class="md:h-full"> <div class="max-w-sm md:h-full md:max-w-full md:w-[32rem] flex flex-col"> <div class="pt-4 text-content dark:text-dark-content text-sm font-medium leading-7 tracking-widest flex gap-2 items-center"> <svg width="25" height="25" viewBox="0 0 25 25" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M0.5 6.5C0.5 3.18629 3.18629 0.5 6.5 0.5H18.5C21.8137 0.5 24.5 3.18629 24.5 6.5V18.5C24.5 21.8137 21.8137 24.5 18.5 24.5H6.5C3.18629 24.5 0.5 21.8137 0.5 18.5V6.5Z" class="fill-tertiary dark:fill-dark-tertiary"/> </svg> PLATFORM </div> <h2 class="overflow-hidden mt-2 text-title dark:text-dark-title text-2xl font-bold leading-7">The OCaml Platform</h2> <div class="mt-4 text-content dark:text-dark-content text-base font-normal h-14 text-ellipsis overflow-hidden leading-7 max-w-prose"> Learn to leverage the tooling around OCaml and create your own projects and libraries </div> <ul class="flex flex-col grow gap-4 mt-5 md:h-60"> <li class="w-full"> <a href="/docs/bootstrapping-a-dune-project" class="bg-white dark:bg-dark-card text-title dark:text-dark-title hover:bg-primary dark:hover:bg-dark-primary hover:text-white dark:hover:text-dark-title drop-shadow hover:drop-shadow-xl flex gap-2 border-primary dark:border-dark-primary border-2 rounded-lg p-2.5 text-md font-bold"> <span class="grow">Bootstrapping a Project</span> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" d="M12.75 15l3-3m0 0l-3-3m3 3h-7.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /> </svg> </a> </li> <li class="w-full"> <a href="/docs/managing-dependencies" class="bg-white dark:bg-dark-card text-title dark:text-dark-title hover:bg-primary dark:hover:bg-dark-primary hover:text-white dark:hover:text-dark-title drop-shadow hover:drop-shadow-xl flex gap-2 border-primary dark:border-dark-primary border-2 rounded-lg p-2.5 text-md font-bold"> <span class="grow">Managing Dependencies</span> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" d="M12.75 15l3-3m0 0l-3-3m3 3h-7.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /> </svg> </a> </li> <li class="w-full"> <a href="/docs/install-a-specific-ocaml-compiler-version" class="bg-white dark:bg-dark-card text-title dark:text-dark-title hover:bg-primary dark:hover:bg-dark-primary hover:text-white dark:hover:text-dark-title drop-shadow hover:drop-shadow-xl flex gap-2 border-primary dark:border-dark-primary border-2 rounded-lg p-2.5 text-md font-bold"> <span class="grow">Install a Specific Compiler Version</span> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" d="M12.75 15l3-3m0 0l-3-3m3 3h-7.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /> </svg> </a> </li> <li class="w-full"> <a href="/docs/set-up-editor" class="bg-white dark:bg-dark-card text-title dark:text-dark-title hover:bg-primary dark:hover:bg-dark-primary hover:text-white dark:hover:text-dark-title drop-shadow hover:drop-shadow-xl flex gap-2 border-primary dark:border-dark-primary border-2 rounded-lg p-2.5 text-md font-bold"> <span class="grow">Configuring Your Editor</span> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" d="M12.75 15l3-3m0 0l-3-3m3 3h-7.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /> </svg> </a> </li> </ul> <a href="/docs/tools" class="mt-4 text-primary dark:text-dark-title hover:underline dark:hover:text-dark-primary dark:underline items-center leading-10"> Platform Tools Documentation </a> </div> </div> </div> <div class="border-t border-separator_30 dark:border-dark-separator_30 my-6"></div> <div class="grid gap-6 mt-6 lg:grid-cols-2"> <div class="md:h-full"> <div class="max-w-sm md:h-full md:max-w-full md:w-[32rem] flex flex-col"> <div class="pt-4 text-content dark:text-dark-content text-sm font-medium leading-7 tracking-widest flex gap-2 items-center"> <svg width="25" height="25" viewBox="0 0 25 25" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M0.5 6.5C0.5 3.18629 3.18629 0.5 6.5 0.5H18.5C21.8137 0.5 24.5 3.18629 24.5 6.5V18.5C24.5 21.8137 21.8137 24.5 18.5 24.5H6.5C3.18629 24.5 0.5 21.8137 0.5 18.5V6.5Z" class="fill-tertiary dark:fill-dark-tertiary"/> </svg> RECOMMENDED BOOK </div> <h2 class="overflow-hidden mt-2 text-title dark:text-dark-title text-2xl font-bold leading-7">Real World OCaml</h2> <div class="grow mt-6 grid grid-cols-1 md:grid-cols-2 gap-6 pt-6"> <div class="flex flex-col"> <a href="https://realworldocaml.org/" target="_blank"> <div class="relative"> <div class="absolute -mt-8 ml-3 w-16 h-16"> <div class="bg-primary dark:bg-dark-primary rotate-[-10deg] rounded-full w-16 h-16 flex items-center justify-center" style="filter: drop-shadow(-4px -2px 4px rgb(0 0 0 / 0.25));"> <div class="text-center text-white text-base font-bold leading-7 tracking-wide"> FREE </div> </div> </div> <img src="/media/_/NmRkY2MwMzg0YjUyOTNmODM0NjdlMDQ0NGI4NzIzOWY/books/real-world-ocaml.jpg" class="w-full border z-10" alt=""> </div> </a> </div> <div> <div class="px-3 inline-block bg-tertiary dark:bg-dark-tertiary_lighter rounded-3xl font-semibold text-center text-white dark:text-dark-title tracking-widest"> Intermediate </div> <p class="mt-2 text-content dark:text-dark-content text-sm font-normal whitespace-normal max-w-prose"> This practical book guides through using OCaml for real-world problems in data processing and web applications, covering its various programming styles with real examples. It starts with basics and advances to topics like the module system and foreign-function interface, focusing on efficient coding using the Jane Street core library. </p> <div class="pt-4"> <a href="https://realworldocaml.org/" class="flex gap-2 text-primary dark:text-dark-title hover:underline dark:hover:text-dark-primary items-center leading-8" target="_blank">Read Online <svg xmlns="http://www.w3.org/2000/svg" fill="none" class="h-4 w-4" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" class="size-6"> <path stroke-linecap="round" stroke-linejoin="round" d="M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244" /> </svg> </a> </div> </div> </div> <a href="/books" class="pt-6 w-max text-primary dark:text-dark-title hover:underline dark:underline hover:text-primary dark:hover:text-dark-primary items-center leading-10"> See More Books </a> </div> </div> <div class="md:h-full"> <div class="max-w-sm md:h-full md:max-w-full md:w-[32rem] flex flex-col"> <div class="pt-4 text-content dark:text-dark-content text-sm font-medium leading-7 tracking-widest flex gap-2 items-center"> <svg width="25" height="25" viewBox="0 0 25 25" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M0.5 6.5C0.5 3.18629 3.18629 0.5 6.5 0.5H18.5C21.8137 0.5 24.5 3.18629 24.5 6.5V18.5C24.5 21.8137 21.8137 24.5 18.5 24.5H6.5C3.18629 24.5 0.5 21.8137 0.5 18.5V6.5Z" class="fill-tertiary dark:fill-dark-tertiary"/> </svg> RECOMMENDED BOOK </div> <h2 class="overflow-hidden mt-2 text-title dark:text-dark-title text-2xl font-bold leading-7">More OCaml: Algorithms, Methods, & Diversions</h2> <div class="grow mt-6 grid grid-cols-1 md:grid-cols-2 gap-6 pt-6"> <div class="flex flex-col"> <a href="https://www.amazon.com/gp/product/0957671113" target="_blank"> <div class="relative"> <img src="/media/_/NmYwMGYzNGNiOTk0YTM0NTIzNDUxMzNiNDdiN2Y1ZmE/books/more-ocaml-algorithms-methods-diversions.jpg" class="w-full border z-10" alt=""> </div> </a> </div> <div> <div class="px-3 inline-block bg-tertiary dark:bg-dark-tertiary_lighter rounded-3xl font-semibold text-center text-white dark:text-dark-title tracking-widest"> Intermediate </div> <p class="mt-2 text-content dark:text-dark-content text-sm font-normal whitespace-normal max-w-prose"> "More OCaml" by John Whitington explores OCaml's functional programming and algorithms, concluding with a PDF file project. Tailored for both existing OCaml programmers and those new to the language, it includes exercises with answers. The book starts with an OCaml fundamentals summary, making it accessible and informative for a diverse readership. </p> <div class="pt-4"> <a href="https://www.amazon.com/gp/product/0957671113" class="flex gap-2 text-primary dark:text-dark-title hover:underline dark:hover:text-dark-primary items-center leading-8" target="_blank">Buy on Amazon <svg xmlns="http://www.w3.org/2000/svg" fill="none" class="h-4 w-4" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" class="size-6"> <path stroke-linecap="round" stroke-linejoin="round" d="M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244" /> </svg> </a> </div> </div> </div> <a href="/books" class="pt-6 w-max text-primary dark:text-dark-title hover:underline dark:underline hover:text-primary dark:hover:text-dark-primary items-center leading-10"> See More Books </a> </div> </div> </div> <div class="border-t border-separator_30 dark:border-dark-separator_30 my-6"></div> <div class="my-6"> <div class="bg-background dark:bg-dark-background flex flex-col"> <div class="max-w-sm md:max-w-full lg:w-full flex flex-col"> <div class="pt-4 text-content dark:text-dark-content text-sm font-medium leading-7 tracking-widest flex gap-2 items-center"> <svg width="25" height="25" viewBox="0 0 25 25" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M0.5 6.5C0.5 3.18629 3.18629 0.5 6.5 0.5H18.5C21.8137 0.5 24.5 3.18629 24.5 6.5V18.5C24.5 21.8137 21.8137 24.5 18.5 24.5H6.5C3.18629 24.5 0.5 21.8137 0.5 18.5V6.5Z" class="fill-tertiary dark:fill-dark-tertiary"/> </svg> EXERCISES </div> <h2 class="overflow-hidden mt-2 text-title dark:text-dark-title text-2xl font-bold leading-7">Practice with Exercises</h2> <div class="mt-6 grid gap-6 md:gap-10 md:grid-cols-2 lg:grid-cols-4"> <a class="flex flex-col p-5 card dark:dark-card" href="/exercises#55"> <div class="flex-grow dark:text-dark-title"> Generate completely balanced binary trees for a given number of nodes using the cbal_tree function. </div> <div class="my-2.5"> <div class="px-3 inline-block bg-tertiary dark:bg-dark-tertiary_lighter rounded-3xl font-semibold text-center text-white dark:text-dark-title tracking-widest"> Intermediate </div> </div> </a> <a class="flex flex-col p-5 card dark:dark-card" href="/exercises#64"> <div class="flex-grow dark:text-dark-title"> Assign coordinates (x, y) to nodes in a binary tree, with x based on the inorder sequence and y based on the depth of the node. </div> <div class="my-2.5"> <div class="px-3 inline-block bg-tertiary dark:bg-dark-tertiary_lighter rounded-3xl font-semibold text-center text-white dark:text-dark-title tracking-widest"> Intermediate </div> </div> </a> <a class="flex flex-col p-5 card dark:dark-card" href="/exercises#68"> <div class="flex-grow dark:text-dark-title"> Generate the preorder and inorder sequences of a binary tree. </div> <div class="my-2.5"> <div class="px-3 inline-block bg-tertiary dark:bg-dark-tertiary_lighter rounded-3xl font-semibold text-center text-white dark:text-dark-title tracking-widest"> Intermediate </div> </div> </a> <a class="flex flex-col p-5 card dark:dark-card" href="/exercises#81"> <div class="flex-grow dark:text-dark-title"> Return all acyclic paths between two nodes a and b in a given graph. </div> <div class="my-2.5"> <div class="px-3 inline-block bg-tertiary dark:bg-dark-tertiary_lighter rounded-3xl font-semibold text-center text-white dark:text-dark-title tracking-widest"> Intermediate </div> </div> </a> </div> </div> <a href="/exercises" class="pt-4 text-primary dark:text-dark-title hover:underline dark:underline hover:text-primary dark:hover:text-dark-primary items-center leading-10"> View all Exercises </a> </div> </div> <a href="/manual" class="block bg-gradient-to-r from-[#C54B21] dark:from-[#773E21] to-[#E18C34] dark:to-[#E7B573] hover:from-[#B63701] hover:to-[#EE8703] dark:hover:from-[#803814] dark:hover:to-[#F1B566] rounded-3xl"> <div class="bg-[url('/img/learn/banner-background.svg')] bg-cover w-full items-center flex flex-col md:flex-row gap-6 py-4 px-7 md:py-4 md:pl-14 md:pr-14 lg:pr-24"> <div class="flex flex-col flex-grow my-6"> <div class="text-white text-sm font-medium tracking-widest leading-10">GUIDE</div> <h2 class="text-white text-3xl font-bold leading-10"> Language Manual </h3> <p class="mt-4 text-white font-normal max-w-xl text-base leading-7"> The OCaml language manual is a comprehensive guide covering syntax, features, and usage. It assists developers and learners in understanding capabilities, best practices, and language features. </p> <div class="w-full md:w-80 mt-6 py-2 bg-white rounded-xl text-center text-primary dark:text-dark-primary hover:underline font-bold text-lg"> Take Me There </div> </div> <img class="hidden md:block w-[200px] h-[200px] md:w-72 md:h-72 rounded-full" src="/_/NDBhN2RiZDUxMTU2MGZlNTg0ZGQ1NzQzOGQzMGNkZTI/img/learn/language_manual_camel.png" alt="A friendly-looking camel"> </div> </a> <h2 id="advanced_section" class="mt-16 mb-8 text-content dark:text-dark-content text-3xl font-regular leading-9 tracking-widest"> <span class="text-primary dark:text-dark-primary font-bold">ELEVATED</span> EXPERTISE </h2> <div class="grid gap-6 mt-6 lg:grid-cols-2"> <div class="md:h-full"> <div class="max-w-sm md:h-full md:max-w-full md:w-[32rem] flex flex-col"> <div class="pt-4 text-content dark:text-dark-content text-sm font-medium leading-7 tracking-widest flex gap-2 items-center"> <svg width="26" height="23" viewBox="0 0 26 23" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M11.268 1.5C12.0378 0.166665 13.9622 0.166667 14.7321 1.5L25.1244 19.5C25.8942 20.8333 24.9319 22.5 23.3923 22.5H2.60769C1.06809 22.5 0.105844 20.8333 0.875645 19.5L11.268 1.5Z" class="fill-primary dark:fill-dark-primary"/> </svg> RECOMMENDED BOOK </div> <h2 class="overflow-hidden mt-2 text-title dark:text-dark-title text-2xl font-bold leading-7">OCaml Scientific Computing</h2> <div class="grow mt-6 grid grid-cols-1 md:grid-cols-2 gap-6 pt-6"> <div class="flex flex-col"> <a href="https://link.springer.com/book/10.1007/978-3-030-97645-3" target="_blank"> <div class="relative"> <img src="/media/_/OTg1ZWQ3NWMzZTZkYzVjNDRjN2VkY2FiNWJjNjEzMzk/books/ocaml-scientific-computing.png" class="w-full border z-10" alt=""> </div> </a> </div> <div> <div class="px-3 inline-block bg-primary dark:bg-dark-primary rounded-3xl font-semibold text-center text-white dark:text-dark-title tracking-widest"> Advanced </div> <p class="mt-2 text-content dark:text-dark-content text-sm font-normal whitespace-normal max-w-prose"> This book merges functional programming in OCaml with numerical computation, tailored for data science and AI. It's ideal for those familiar with functional programming, offering a mix of foundational concepts and advanced cloud computing techniques. The structure allows readers to choose topics of interest, making it a versatile guide for learning and applying scientific computing. </p> <div class="pt-4"> <a href="https://link.springer.com/book/10.1007/978-3-030-97645-3" class="flex gap-2 text-primary dark:text-dark-title hover:underline dark:hover:text-dark-primary items-center leading-8" target="_blank">Buy on Springer <svg xmlns="http://www.w3.org/2000/svg" fill="none" class="h-4 w-4" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" class="size-6"> <path stroke-linecap="round" stroke-linejoin="round" d="M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244" /> </svg> </a> <a href="https://www.amazon.com/gp/product/3030976440" class="flex gap-2 text-primary dark:text-dark-title hover:underline dark:hover:text-dark-primary items-center leading-8" target="_blank">Buy on Amazon <svg xmlns="http://www.w3.org/2000/svg" fill="none" class="h-4 w-4" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" class="size-6"> <path stroke-linecap="round" stroke-linejoin="round" d="M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244" /> </svg> </a> </div> </div> </div> <a href="/books" class="pt-6 w-max text-primary dark:text-dark-title hover:underline dark:underline hover:text-primary dark:hover:text-dark-primary items-center leading-10"> See More Books </a> </div> </div> </div> <div class="mt-10 lg:mt-20"> <h3 class="font-bold text-title dark:text-dark-title">Papers</h3> <div class="mt-6 text-content dark:text-dark-content text-lg"> Aspiring towards greater understanding of the language? Want to push the limits and discover brand new things? Check out papers written by leading OCaml researchers: </div> <div class="flex flex-col lg:flex-row mt-8 space-y-4 lg:space-y-0 lg:space-x-6"> <a href="https://dl.acm.org/doi/10.1145/3453483.3454039" class="card dark:dark-card p-6 flex-1" > <div class="font-semibold text-base dark:text-dark-title mb-3">Retrofitting Effect Handlers Onto OCaml</div> <div class="dark:text-dark-content" style="display: -webkit-box;-webkit-line-clamp: 4;-webkit-box-orient: vertical;overflow: hidden;">Effect handlers have been gathering momentum as a mechanism for modular programming with user-defined effects. Effect handlers allow for non-local control flow mechanisms such as generators, async/await, lightweight threads, and coroutines to be composably expressed. We present a design and evaluate a full-fledged efficient implementation of effect handlers for OCaml, an industrial-strength multi-paradigm programming language. Our implementation strives to maintain the backwards compatibility and performance profile of existing OCaml code. Retrofitting effect handlers onto OCaml is challenging since OCaml does not currently have any non-local control flow mechanisms other than exceptions. Our implementation of effect handlers for OCaml: (i) imposes a mean 1% overhead on a comprehensive macro benchmark suite that does not use effect handlers; (ii) remains compatible with program analysis tools that inspect the stack; and (iii) is efficient for new code that makes use of effect handlers. </div> <div class="font-bold text-sm dark:text-dark-content mt-3">K. C. Sivaramakrishnan, Stephen Dolan, Leo White, Tom Kelly, Sadiq Jaffer, Anil Madhavapeddy</div> <div class="flex mt-5 flex-wrap"> <div class="text-blue-700 dark:text-dark-title h-8 inline-flex items-center text-sm px-3 border border-blue-700 dark:border-dark-title rounded-3xl whitespace-nowrap mr-2 mb-2" > PLDI </div> <div class="text-blue-700 dark:text-dark-title h-8 inline-flex items-center text-sm px-3 border border-blue-700 dark:border-dark-title rounded-3xl whitespace-nowrap mr-2 mb-2" > effects </div> </div> </a> <a href="https://arxiv.org/pdf/1905.06543.pdf" class="card dark:dark-card p-6 flex-1" > <div class="font-semibold text-base dark:text-dark-title mb-3">Extending OCaml's `open`</div> <div class="dark:text-dark-content" style="display: -webkit-box;-webkit-line-clamp: 4;-webkit-box-orient: vertical;overflow: hidden;">We propose a harmonious extension of OCaml's `open` construct. OCaml's existing construct `open M` imports the names exported by the module `M` into the current scope. At present `M` is required to be the path to a module. We propose extending `open` to instead accept an arbitrary module expression, making it possible to succinctly address a number of existing scope-related difficulties that arise when writing OCaml programs. </div> <div class="font-bold text-sm dark:text-dark-content mt-3">Runhang Li, Jeremy Yallop</div> <div class="flex mt-5 flex-wrap"> <div class="text-blue-700 dark:text-dark-title h-8 inline-flex items-center text-sm px-3 border border-blue-700 dark:border-dark-title rounded-3xl whitespace-nowrap mr-2 mb-2" > ocaml-workshop </div> <div class="text-blue-700 dark:text-dark-title h-8 inline-flex items-center text-sm px-3 border border-blue-700 dark:border-dark-title rounded-3xl whitespace-nowrap mr-2 mb-2" > core </div> <div class="text-blue-700 dark:text-dark-title h-8 inline-flex items-center text-sm px-3 border border-blue-700 dark:border-dark-title rounded-3xl whitespace-nowrap mr-2 mb-2" > language </div> </div> </a> <a href="http://kcsrk.info/papers/pldi18-memory.pdf" class="card dark:dark-card p-6 flex-1" > <div class="font-semibold text-base dark:text-dark-title mb-3">Bounding Data Races in Space and Time</div> <div class="dark:text-dark-content" style="display: -webkit-box;-webkit-line-clamp: 4;-webkit-box-orient: vertical;overflow: hidden;">We propose a new semantics for shared-memory parallel programs that gives strong guarantees even in the presence of data races. Our local data race freedom property guar- antees that all data-race-free portions of programs exhibit sequential semantics. We provide a straightforward oper- ational semantics and an equivalent axiomatic model, and evaluate an implementation for the OCaml programming language. Our evaluation demonstrates that it is possible to balance a comprehensible memory model with a reasonable (no overhead on x86, ~0.6% on ARM) sequential performance trade-off in a mainstream programming language </div> <div class="font-bold text-sm dark:text-dark-content mt-3">Stephen Dolan, KC Sivaramakrishnan, Anil Madhavapeddy</div> <div class="flex mt-5 flex-wrap"> <div class="text-blue-700 dark:text-dark-title h-8 inline-flex items-center text-sm px-3 border border-blue-700 dark:border-dark-title rounded-3xl whitespace-nowrap mr-2 mb-2" > PLDI </div> <div class="text-blue-700 dark:text-dark-title h-8 inline-flex items-center text-sm px-3 border border-blue-700 dark:border-dark-title rounded-3xl whitespace-nowrap mr-2 mb-2" > multicore </div> </div> </a> </div> <a href="/papers" class="btn btn-lg btn-ghost dark:border-dark-primary dark:hover:bg-dark-primary dark:hover:text-dark-title dark:text-dark-primary mt-8"> <span>View all papers</span> <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5" /> </svg> </a> </div> </div> </div> </div> </main> <button class="fixed bottom-8 right-10 md:bottom-[5rem] lg:bottom-[8.37rem] lg:right-[6.5rem] border-0 hidden focus:outline-none z-50 rounded-full shadow-custom p-4 bg-primary dark:bg-dark-primary" onclick="scrollToTop()" id="scrollToTop" title="Scroll to top"><svg class="h-6 w-6" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"> <path d="M4.5 10.5L12 3M12 3L19.5 10.5M12 3V21" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> </svg> </button> <footer x-data class="border-t border-separator_30 dark:border-dark-separator_30 bg-dark-sand dark:bg-dark-card" aria-labelledby="footer-heading"> <h2 id="footer-heading" class="sr-only">Footer</h2> <div class="mx-auto max-w-7xl px-6 py-16 lg:px-8"> <div class="flex w-full items-center justify-between mb-8"> <a href="/"><img class="h-8 dark:hidden" src="/_/MDBjN2M4YjIxY2Y1YWExZWE3Njk4M2FiZTg1NWZjNTM/logo-with-name.svg" alt="OCaml"> <img class="h-8 hidden dark:inline" src="/_/MTE3YWE5YzJlZmExNmYyMmI3ZmEwYjliMDEwNDBkMDY/logo-with-name-white.svg" alt="OCaml"> </a> <div class="hidden md:flex"> <button class="flex grow basis-0 justify-center items-center py-2 px-4 text-sm border rounded-l rounded-l-full border-r-0" :class='$store.themeSettings.preference === "light" ? "bg-gradient-to-r from-[#FFA932] to-[#C24F1E] text-white dark:text-dark-title outline-none" : "bg-white text-content outline-2 outline-card_border dark:outline-dark-separator_30"' @click='$store.themeSettings.setPreference("light")' > <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14" fill="none" class="mr-2"> <path d="M7 0.5V2.125M11.5962 2.40378L10.4472 3.55283M13.5 7H11.875M11.5962 11.5962L10.4472 10.4472M7 11.875V13.5M3.55283 10.4472L2.40378 11.5962M2.125 7H0.5M3.55283 3.55283L2.40378 2.40378M9.70833 7C9.70833 7.71829 9.42299 8.40717 8.91508 8.91508C8.40717 9.42299 7.71829 9.70833 7 9.70833C6.28171 9.70833 5.59283 9.42299 5.08492 8.91508C4.57701 8.40717 4.29167 7.71829 4.29167 7C4.29167 6.28171 4.57701 5.59283 5.08492 5.08492C5.59283 4.57701 6.28171 4.29167 7 4.29167C7.71829 4.29167 8.40717 4.57701 8.91508 5.08492C9.42299 5.59283 9.70833 6.28171 9.70833 7Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/> </svg> Light </button> <button class="flex grow basis-0 justify-center items-center py-2 px-4 text-sm border border-r-0" :class='$store.themeSettings.preference === "dark" ? "bg-gradient-to-r from-[#0F254F] to-[#0B1228] text-white dark:text-dark-title outline-none" : "bg-white text-content outline-2 outline-card_border dark:outline-dark-separator_30"' @click='$store.themeSettings.setPreference("dark")' > <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none" class="mr-2"> <path d="M11.1573 7.90842C10.5134 8.17678 9.8226 8.3145 9.125 8.31358C6.20812 8.31358 3.84375 5.94921 3.84375 3.03233C3.84375 2.31192 3.98783 1.62562 4.24892 1C3.28663 1.40144 2.46465 2.07865 1.88651 2.94635C1.30836 3.81404 0.999911 4.83342 1 5.87608C1 8.79296 3.36437 11.1573 6.28125 11.1573C7.32391 11.1574 8.34329 10.849 9.21099 10.2708C10.0787 9.69268 10.7559 8.8707 11.1573 7.90842Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/> </svg> Dark </button> <button class="flex grow basis-0 justify-center items-center py-2 px-4 text-sm border rounded-r rounded-r-full" :class='$store.themeSettings.preference === "system" ? "bg-gradient-to-r from-[#2B7866] to-[#004039] text-white dark:text-dark-title outline-none" : "bg-white text-content outline-2 outline-card_border dark:outline-dark-separator_30"' @click='$store.themeSettings.setPreference("system")' > <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" class="mr-2"> <path d="M7.19553 2.955C7.26303 2.5485 7.61553 2.25 8.02803 2.25H9.97278C10.3853 2.25 10.7378 2.5485 10.8053 2.955L10.965 3.91575C11.0123 4.19625 11.1998 4.43025 11.4488 4.56825C11.5043 4.59825 11.559 4.6305 11.6138 4.6635C11.8575 4.8105 12.1538 4.85625 12.42 4.7565L13.3328 4.4145C13.5198 4.34416 13.7258 4.34248 13.9139 4.40978C14.1021 4.47708 14.2603 4.60899 14.3603 4.782L15.3323 6.46725C15.4321 6.64028 15.4672 6.8431 15.4315 7.03962C15.3958 7.23615 15.2916 7.41363 15.1373 7.5405L14.385 8.16075C14.1653 8.3415 14.0565 8.6205 14.0625 8.90475C14.0636 8.9685 14.0636 9.03225 14.0625 9.096C14.0565 9.3795 14.1653 9.6585 14.385 9.83925L15.138 10.4595C15.456 10.722 15.5385 11.1758 15.333 11.532L14.3595 13.2172C14.2597 13.3902 14.1017 13.5222 13.9137 13.5896C13.7257 13.657 13.5198 13.6556 13.3328 13.5855L12.42 13.2435C12.1538 13.1438 11.8575 13.1895 11.613 13.3365C11.5587 13.3696 11.5037 13.4016 11.448 13.4325C11.1998 13.5697 11.0123 13.8037 10.965 14.0842L10.8053 15.045C10.7378 15.4523 10.3853 15.75 9.97278 15.75H8.02728C7.61478 15.75 7.26303 15.4515 7.19478 15.045L7.03503 14.0842C6.98853 13.8037 6.80103 13.5698 6.55203 13.4318C6.49642 13.4011 6.44141 13.3693 6.38703 13.3365C6.14328 13.1895 5.84703 13.1438 5.58003 13.2435L4.66728 13.5855C4.48033 13.6556 4.27456 13.6572 4.08656 13.5899C3.89856 13.5226 3.74051 13.3908 3.64053 13.218L2.66778 11.5328C2.56799 11.3597 2.53282 11.1569 2.56852 10.9604C2.60423 10.7639 2.7085 10.5864 2.86278 10.4595L3.61578 9.83925C3.83478 9.65925 3.94353 9.3795 3.93828 9.096C3.93711 9.03226 3.93711 8.96849 3.93828 8.90475C3.94353 8.61975 3.83478 8.3415 3.61578 8.16075L2.86278 7.5405C2.70869 7.41367 2.60454 7.23633 2.56884 7.03997C2.53314 6.84361 2.56819 6.64095 2.66778 6.468L3.64053 4.78275C3.74042 4.6096 3.89854 4.47754 4.08672 4.4101C4.27489 4.34266 4.4809 4.34422 4.66803 4.4145L5.58003 4.7565C5.84703 4.85625 6.14328 4.8105 6.38703 4.6635C6.44103 4.6305 6.49653 4.599 6.55203 4.5675C6.80103 4.43025 6.98853 4.19625 7.03503 3.91575L7.19553 2.955Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/> <path d="M11.25 9C11.25 9.59674 11.0129 10.169 10.591 10.591C10.169 11.0129 9.59674 11.25 9 11.25C8.40326 11.25 7.83097 11.0129 7.40901 10.591C6.98705 10.169 6.75 9.59674 6.75 9C6.75 8.40326 6.98705 7.83097 7.40901 7.40901C7.83097 6.98705 8.40326 6.75 9 6.75C9.59674 6.75 10.169 6.98705 10.591 7.40901C11.0129 7.83097 11.25 8.40326 11.25 9Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/> </svg> System </button> </div> </div> <div class="xl:grid xl:grid-cols-3 xl:gap-8"> <div class="space-y-8"> <p class="text-base leading-6 text-title dark:text-dark-content">Innovation. Community. Security.</p> <div class="flex space-x-6"> <a href="https://github.com/ocaml" class="text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary"> <span class="sr-only">GitHub</span> <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"> <path fill-rule="evenodd" d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z" clip-rule="evenodd" /> </svg> </a> <a href="https://discord.gg/cCYQbqN" class="text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary"> <span class="sr-only">Discord</span> <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"> <path fill-rule="evenodd" d="M18.9419 5.29661C17.6473 4.69088 16.263 4.25066 14.8157 4C14.638 4.32134 14.4304 4.75355 14.2872 5.09738C12.7487 4.86601 11.2245 4.86601 9.7143 5.09738C9.57116 4.75355 9.3588 4.32134 9.17947 4C7.73067 4.25066 6.3448 4.6925 5.05016 5.29982C2.43887 9.24582 1.73099 13.0938 2.08493 16.8872C3.81688 18.1805 5.49534 18.9662 7.14548 19.4804C7.55291 18.9196 7.91628 18.3235 8.22931 17.6953C7.63313 17.4688 7.06211 17.1892 6.52256 16.8647C6.6657 16.7586 6.80571 16.6478 6.94098 16.5337C10.2318 18.0729 13.8074 18.0729 17.0589 16.5337C17.1958 16.6478 17.3358 16.7586 17.4774 16.8647C16.9362 17.1908 16.3637 17.4704 15.7675 17.697C16.0805 18.3235 16.4423 18.9212 16.8513 19.4819C18.503 18.9678 20.183 18.1822 21.915 16.8872C22.3303 12.4897 21.2056 8.67705 18.9419 5.29661ZM8.67765 14.5543C7.68977 14.5543 6.87963 13.632 6.87963 12.509C6.87963 11.3859 7.67247 10.4621 8.67765 10.4621C9.68285 10.4621 10.493 11.3843 10.4757 12.509C10.4772 13.632 9.68285 14.5543 8.67765 14.5543ZM15.3223 14.5543C14.3344 14.5543 13.5243 13.632 13.5243 12.509C13.5243 11.3859 14.3171 10.4621 15.3223 10.4621C16.3275 10.4621 17.1376 11.3843 17.1203 12.509C17.1203 13.632 16.3275 14.5543 15.3223 14.5543Z" clip-rule="evenodd" /> </svg> </a> <a href="https://twitter.com/ocaml_org" class="text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary"> <span class="sr-only">Twitter</span> <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"> <path d="M8.29 20.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0022 5.92a8.19 8.19 0 01-2.357.646 4.118 4.118 0 001.804-2.27 8.224 8.224 0 01-2.605.996 4.107 4.107 0 00-6.993 3.743 11.65 11.65 0 01-8.457-4.287 4.106 4.106 0 001.27 5.477A4.072 4.072 0 012.8 9.713v.052a4.105 4.105 0 003.292 4.022 4.095 4.095 0 01-1.853.07 4.108 4.108 0 003.834 2.85A8.233 8.233 0 012 18.407a11.616 11.616 0 006.29 1.84" /> </svg> </a> <a href="https://watch.ocaml.org/" class="text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary"> <span class="sr-only">Peertube</span> <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"> <path fill-rule="evenodd" d="M5 2V12L12.4998 7.00047" clip-rule="evenodd" /> <path fill-rule="evenodd" d="M5 12V22L12.4998 17.0005" clip-rule="evenodd" /> <path fill-rule="evenodd" d="M12.4998 6.99951V16.9995L19.9995 12" clip-rule="evenodd" /> </svg> </a> <a href="/planet.xml" class="text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary"> <span class="sr-only">RSS</span> <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"> <path fill-rule="evenodd" d="M15.2692 22H11.3846C11.3846 16.8462 7.11538 12.6154 2 12.6154V8.73077C9.26923 8.73077 15.2692 14.7308 15.2692 22ZM18 22C18 13.2308 10.7692 6 2 6V2C12.9615 2 22 11.0385 22 22H18Z" clip-rule="evenodd" /> <path fill-rule="evenodd" d="M4.73077 22C6.23893 22 7.46154 20.7774 7.46154 19.2692C7.46154 17.7611 6.23893 16.5385 4.73077 16.5385C3.22261 16.5385 2 17.7611 2 19.2692C2 20.7774 3.22261 22 4.73077 22Z" clip-rule="evenodd" /> </svg> </a> </div> <div class="flex w-full md:hidden"> <button class="flex grow basis-0 justify-center items-center py-2 px-4 text-sm border rounded-l rounded-l-full border-r-0" :class='$store.themeSettings.preference === "light" ? "bg-gradient-to-r from-[#FFA932] to-[#C24F1E] text-white dark:text-dark-title outline-none" : "bg-white text-content outline-2 outline-card_border dark:outline-dark-separator_30"' @click='$store.themeSettings.setPreference("light")' > <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14" fill="none" class="mr-2"> <path d="M7 0.5V2.125M11.5962 2.40378L10.4472 3.55283M13.5 7H11.875M11.5962 11.5962L10.4472 10.4472M7 11.875V13.5M3.55283 10.4472L2.40378 11.5962M2.125 7H0.5M3.55283 3.55283L2.40378 2.40378M9.70833 7C9.70833 7.71829 9.42299 8.40717 8.91508 8.91508C8.40717 9.42299 7.71829 9.70833 7 9.70833C6.28171 9.70833 5.59283 9.42299 5.08492 8.91508C4.57701 8.40717 4.29167 7.71829 4.29167 7C4.29167 6.28171 4.57701 5.59283 5.08492 5.08492C5.59283 4.57701 6.28171 4.29167 7 4.29167C7.71829 4.29167 8.40717 4.57701 8.91508 5.08492C9.42299 5.59283 9.70833 6.28171 9.70833 7Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/> </svg> Light </button> <button class="flex grow basis-0 justify-center items-center py-2 px-4 text-sm border border-r-0" :class='$store.themeSettings.preference === "dark" ? "bg-gradient-to-r from-[#0F254F] to-[#0B1228] text-white dark:text-dark-title outline-none" : "bg-white text-content outline-2 outline-card_border dark:outline-dark-separator_30"' @click='$store.themeSettings.setPreference("dark")' > <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none" class="mr-2"> <path d="M11.1573 7.90842C10.5134 8.17678 9.8226 8.3145 9.125 8.31358C6.20812 8.31358 3.84375 5.94921 3.84375 3.03233C3.84375 2.31192 3.98783 1.62562 4.24892 1C3.28663 1.40144 2.46465 2.07865 1.88651 2.94635C1.30836 3.81404 0.999911 4.83342 1 5.87608C1 8.79296 3.36437 11.1573 6.28125 11.1573C7.32391 11.1574 8.34329 10.849 9.21099 10.2708C10.0787 9.69268 10.7559 8.8707 11.1573 7.90842Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/> </svg> Dark </button> <button class="flex grow basis-0 justify-center items-center py-2 px-4 text-sm border rounded-r rounded-r-full" :class='$store.themeSettings.preference === "system" ? "bg-gradient-to-r from-[#2B7866] to-[#004039] text-white dark:text-dark-title outline-none" : "bg-white text-content outline-2 outline-card_border dark:outline-dark-separator_30"' @click='$store.themeSettings.setPreference("system")' > <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" class="mr-2"> <path d="M7.19553 2.955C7.26303 2.5485 7.61553 2.25 8.02803 2.25H9.97278C10.3853 2.25 10.7378 2.5485 10.8053 2.955L10.965 3.91575C11.0123 4.19625 11.1998 4.43025 11.4488 4.56825C11.5043 4.59825 11.559 4.6305 11.6138 4.6635C11.8575 4.8105 12.1538 4.85625 12.42 4.7565L13.3328 4.4145C13.5198 4.34416 13.7258 4.34248 13.9139 4.40978C14.1021 4.47708 14.2603 4.60899 14.3603 4.782L15.3323 6.46725C15.4321 6.64028 15.4672 6.8431 15.4315 7.03962C15.3958 7.23615 15.2916 7.41363 15.1373 7.5405L14.385 8.16075C14.1653 8.3415 14.0565 8.6205 14.0625 8.90475C14.0636 8.9685 14.0636 9.03225 14.0625 9.096C14.0565 9.3795 14.1653 9.6585 14.385 9.83925L15.138 10.4595C15.456 10.722 15.5385 11.1758 15.333 11.532L14.3595 13.2172C14.2597 13.3902 14.1017 13.5222 13.9137 13.5896C13.7257 13.657 13.5198 13.6556 13.3328 13.5855L12.42 13.2435C12.1538 13.1438 11.8575 13.1895 11.613 13.3365C11.5587 13.3696 11.5037 13.4016 11.448 13.4325C11.1998 13.5697 11.0123 13.8037 10.965 14.0842L10.8053 15.045C10.7378 15.4523 10.3853 15.75 9.97278 15.75H8.02728C7.61478 15.75 7.26303 15.4515 7.19478 15.045L7.03503 14.0842C6.98853 13.8037 6.80103 13.5698 6.55203 13.4318C6.49642 13.4011 6.44141 13.3693 6.38703 13.3365C6.14328 13.1895 5.84703 13.1438 5.58003 13.2435L4.66728 13.5855C4.48033 13.6556 4.27456 13.6572 4.08656 13.5899C3.89856 13.5226 3.74051 13.3908 3.64053 13.218L2.66778 11.5328C2.56799 11.3597 2.53282 11.1569 2.56852 10.9604C2.60423 10.7639 2.7085 10.5864 2.86278 10.4595L3.61578 9.83925C3.83478 9.65925 3.94353 9.3795 3.93828 9.096C3.93711 9.03226 3.93711 8.96849 3.93828 8.90475C3.94353 8.61975 3.83478 8.3415 3.61578 8.16075L2.86278 7.5405C2.70869 7.41367 2.60454 7.23633 2.56884 7.03997C2.53314 6.84361 2.56819 6.64095 2.66778 6.468L3.64053 4.78275C3.74042 4.6096 3.89854 4.47754 4.08672 4.4101C4.27489 4.34266 4.4809 4.34422 4.66803 4.4145L5.58003 4.7565C5.84703 4.85625 6.14328 4.8105 6.38703 4.6635C6.44103 4.6305 6.49653 4.599 6.55203 4.5675C6.80103 4.43025 6.98853 4.19625 7.03503 3.91575L7.19553 2.955Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/> <path d="M11.25 9C11.25 9.59674 11.0129 10.169 10.591 10.591C10.169 11.0129 9.59674 11.25 9 11.25C8.40326 11.25 7.83097 11.0129 7.40901 10.591C6.98705 10.169 6.75 9.59674 6.75 9C6.75 8.40326 6.98705 7.83097 7.40901 7.40901C7.83097 6.98705 8.40326 6.75 9 6.75C9.59674 6.75 10.169 6.98705 10.591 7.40901C11.0129 7.83097 11.25 8.40326 11.25 9Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/> </svg> System </button> </div> </div> <div class="mt-8 grid grid-cols-2 gap-8 xl:col-span-2 xl:mt-0"> <div class="md:grid md:grid-cols-2 md:gap-8"> <div> <h3 class="text-base font-semibold leading-6 text-title dark:text-dark-content">About OCaml</h3> <ul class="mt-6 space-y-4"> <li> <a href="/changelog" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Changelog</a> </li> <li> <a href="/releases" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Releases</a> </li> <li> <a href="/industrial-users" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Industrial Users</a> </li> <li> <a href="/academic-users" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Academic Users</a> </li> <li> <a href="/about" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Why OCaml</a> </li> </ul> </div> <div class="mt-10 md:mt-0"> <h3 class="text-base font-semibold leading-6 text-title dark:text-dark-content">Resources</h3> <ul class="mt-6 space-y-4"> <li> <a href="/install" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Install OCaml</a> </li> <li> <a href="/docs/get-started" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Get Started</a> </li> <li> <a href="/docs/tools" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Platform Tools</a> </li> <li> <a href="/manual" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Language Manual</a> </li> <li> <a href="/api" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Standard Library API</a> </li> <li> <a href="/books" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Books</a> </li> <li> <a href="/exercises" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Exercises</a> </li> <li> <a href="/papers" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Papers</a> </li> <li> <a href="/play" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">OCaml Playground</a> </li> <li> <a href="/logo" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Logo</a> </li> </ul> </div> </div> <div class="md:grid md:grid-cols-2 md:gap-8"> <div> <h3 class="text-base font-semibold leading-6 text-title dark:text-dark-content">Ecosystem</h3> <ul class="mt-6 space-y-4"> <li> <a href="/packages" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Packages</a> </li> <li> <a href="/community" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Community</a> </li> <li> <a href="/events" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Events</a> </li> <li> <a href="/ocaml-planet" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">OCaml Planet</a> </li> <li> <a href="/jobs" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Jobs</a> </li> </ul> </div> <div class="mt-20 md:mt-0"> <h3 class="text-base font-semibold leading-6 text-title dark:text-dark-content">Policies</h3> <ul class="mt-6 space-y-4"> <li> <a href="/policies/carbon-footprint" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Carbon Footprint</a> </li> <li> <a href="/governance" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Governance</a> </li> <li> <a href="/policies/privacy-policy" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Privacy</a> </li> <li> <a href="/policies/code-of-conduct" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Code of Conduct</a> </li> </ul> </div> </div> </div> </div> </div> <script> document.addEventListener('alpine:init', () => { Alpine.store('themeSettings', { init() { this.storageAccess = localStorage.getItem('storageAccess') this.preference = localStorage.getItem('theme') || "system" this.isSystemDefaultDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches }, selected: '', alertOpen: false, storageAccess: false, preference: undefined, isSystemDefaultDark: false, setPreference(preference) { if (!this.storageAccess) { if (!window.confirm("We will remember your choice in your browser's LocalStorage. Allow this?")) { return; } localStorage.setItem('storageAccess', true) storageAccess = true; } this.selected = preference; this.preference = preference localStorage.setItem('theme', preference) if (preference === 'dark') { document.body.classList.add("dark"); } if (preference === 'light') { document.body.classList.remove("dark"); } if (preference === 'system') { if (this.isSystemDefaultDark) { document.body.classList.add("dark"); } else { document.body.classList.remove("dark"); } localStorage.removeItem('theme') return } }, }) }) </script> </footer> <script> function scrollToTop() { window.scrollTo(0, 0); } window.onscroll = function() { showScrollButton(); }; function showScrollButton() { if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) { document.getElementById("scrollToTop").style.display = "block"; } else { document.getElementById("scrollToTop").style.display = "none"; } } </script> </body> </html>