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
use std::cmp::Ordering; | |
enum Tree<T: Ord> { | |
Node {v: T, left: Box<Tree<T>>, right: Box<Tree<T>>}, | |
Empty, | |
} | |
impl<T: Ord> Tree<T> { | |
fn find(&self, target: T) -> bool { |
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
_build/ |
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
(** Supporting code for the "GADTs gone mild" talk *) | |
(** Compact Arrays | |
https://blogs.janestreet.com/why-gadts-matter-for-performance/ | |
*) | |
module CompactArray = struct | |
type 'a t = | |
| Array of 'a array | |
| String of string |
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 atom = Char.t | |
let compare_atom = Char.compare | |
module AMap = CCMap.Make(Char) | |
(** Regular expressions *) | |
module Re = struct | |
module rec Internal : sig | |
type t = | |
| Epsilon |
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
from TreeVisitor import TreeVisitor | |
class MyTreeVisitor(TreeVisitor): | |
def visitLeaf(self, ctx): | |
return True # une feuille est un A.B. | |
def visitNode(self, ctx): | |
children = ctx.int_tree() |
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
module B = Brisk_reconciler | |
let constant name x = | |
B.Expert.nativeComponent name (fun hooks -> | |
( { | |
make = (fun () -> x); | |
configureInstance = (fun ~(isFirstRender : _) node -> node); | |
children = B.empty; | |
insertNode = (fun ~parent ~child:_ ~position:_ -> parent); | |
deleteNode = (fun ~parent ~child:_ ~position:_ -> parent); |
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
\NeedsTeXFormat{LaTeX2e}% | |
\ProvidesPackage{chronology}[2015/03/27 v1.1.1 Horizontal timeline]% | |
\RequirePackage{calc}% | |
\RequirePackage{tikz}% | |
\RequirePackage{xparse}% | |
% Defining counters and lengths | |
\newcounter{step}\newcounter{stepstart}\newcounter{stepstop}% | |
\newcounter{yearstart}\newcounter{yearstop}\newcounter{deltayears}% | |
\newlength{\xstart}\newlength{\xstop}% | |
\newlength{\unit}\newlength{\timelinewidth}% |
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
module type S = sig | |
type 'a m | |
val pure : 'a -> 'a m | |
val delayed : (unit -> 'a) -> 'a m | |
val map : ('a -> 'b) -> 'a m -> 'b m | |
val bind : 'a m -> ('a -> 'b m) -> 'b m |
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
(* Code extracted from: | |
SAT-MICRO: petit mais costaud ! | |
by Sylvain Conchon, Johannes Kanig, Stéphane Lescuyer | |
*) | |
module type VARIABLES = sig | |
type t | |
val compare : t -> t -> int | |
end |
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
[@@@ocaml.warning "-40"] | |
module CB = CamlinternalFormatBasics | |
module C = CamlinternalFormat | |
module F = Format | |
type ufmt = Format.formatter -> unit | |
(* copied from format.ml, don't ask *) |
NewerOlder