package transept

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file utils.ml

1
2
3
4
5
6
7
8
9
10
11
12
let constant c _ = c

let uncurry f (x, y) = f x y

let curry f x y = f (x, y)

let chars_of_string s = List.init (String.length s) (String.get s)

let string_of_chars chars =
  let buf = Buffer.create 13 in
  List.iter (Buffer.add_char buf) chars;
  Buffer.contents buf
OCaml

Innovation. Community. Security.