This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Document Outline Test</title> | |
</head> | |
<body> | |
<div class="content"> | |
<h1>Module Order</h1> | |
<p>Functionality for comparison and ordering of OCaml values.</p> | |
<section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{- * Foundational functions -} | |
id :: a -> a | |
id x = x | |
const :: a -> b -> a | |
const x y = x | |
fix :: (a -> a) -> a | |
fix f = f (fix f) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Church-encoded" lists and their interesting properties | |
=== | |
*This is a literate Haskell program which you can run in ghci.* | |
*Also, I already corrected a glaring problem. Let us speak no more of it.* | |
One of the beautiful things about computer science is that, fundamentally, | |
**data is code** and **code is data**. But what does that mean? And how is it | |
useful? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Protobuf Builder | |
# ================ | |
# | |
# This image builds protocol buffers library from source with Go generation | |
# support. The builder and runner images are produced. | |
# Builder Image | |
# ------------- | |
FROM golang:1.8.3-alpine3.6 as builder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* | |
* Work-in-progress implementation of a simple parser combinator library. | |
*) | |
type input = char list | |
(** Parser input is a list of characters. *) | |
module type Parser = sig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <assert.h> | |
#include <forward_list> | |
#include <functional> | |
template <typename T> | |
struct option { | |
public: | |
class no_value { }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(*--------------------------------------------------------------------------- | |
Copyright (c) 2015 Daniel C. Bünzli. All rights reserved. | |
Distributed under the BSD3 license, see license at the end of the file. | |
%%NAME%% release %%VERSION%% | |
---------------------------------------------------------------------------*) | |
(* Simple generators according to: | |
Kiselyov, Peyton-Jones, Sabry | |
Lazy v. Yield: Incremental, Linear Pretty-printing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type void | |
(* Core pipe type *) | |
type ('a, 'b, 'r) pipe = | |
| Yield of ('b * (unit -> ('a, 'b, 'r) pipe)) | |
| Await of ('a -> ('a, 'b, 'r) pipe) | |
| Ready of 'r | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- This is a single line comment | |
{- This is a multi-line comment, | |
it can span multiple lines -} | |
{- Multi-line comments can be {- nested -} -} | |
-- This is a value binding. | |
val answer = 42 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Generic implementation of the `contains` function. | |
// No dependencies, runs on any unix machine with a go compiler! | |
// | |
// Build instruction: | |
// | |
// $ go generate | |
// $ go run gen.go | |
// | |
package main |