package lsp
LSP protocol implementation in OCaml
Install
Dune Dependency
Authors
-
AAndrey Popp <8mayday@gmail.com>
-
RRusty Key <iam@stfoo.ru>
-
LLouis Roché <louis@louisroche.net>
-
OOleksiy Golovko <alexei.golovko@gmail.com>
-
RRudi Grinberg <me@rgrinberg.com>
-
SSacha Ayoun <sachaayoun@gmail.com>
-
Ccannorin <cannorin@gmail.com>
-
UUlugbek Abdullaev <ulugbekna@gmail.com>
-
Thibaut Mattio
-
MMax Lantas <mnxndev@outlook.com>
Maintainers
Sources
jsonrpc-1.10.3.tbz
sha256=a3ac1073b0728b94f4bdb0111772c0abaf7ff70324399450eab7156bfac151f1
sha512=bed6ddbde28088e43db0d40ab27056ba22537d19ffe8117a3da4c77676948f18708b06937dd2c972dce5c5822ea751c9c85cfa1ce3c1b3739460d4a24ebc2282
doc/lsp.ordering/Ordering/O/index.html
Module Ordering.O
Source
A convenient operator for efficiently chaining multiple comparisons together. For example, you can write
let compare { x; y; z } t = let open Ordering.O in let= () = compare_x x t.x in let= () = compare_y y t.y in compare_z z t.z
or, a bit less compactly but more symmetrically
let compare { x; y; z } t = let open Ordering.O in let= () = compare_x x t.x in let= () = compare_y y t.y in let= () = compare_z z t.z in Eq
to chain three comparisons instead of the usual triply nested match
.
Note that the resulting code can be up to 2x slower than nested match
ing due to extra allocations that we are unable to eliminate (as of Nov 2021), so you should use let=
only where appropriate.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>