package octez-proto-libs
Octez protocol libraries
Install
Dune Dependency
Authors
Maintainers
Sources
octez-19.1.tar.gz
sha256=55ea1fb8bb3273a7fc270ca8f650d45c56449665619482aad9bc12f3ea736b7e
sha512=fec850fc2d17d7490bbabd5147d62aad13b3aaed8774270f8a38ab419670ed03e0fd30cf8642a97984eca5c2446726fe590ad99c015f7ec50919dc7652f25053
doc/octez-proto-libs.protocol-environment/Tezos_protocol_environment/V5/Make/Either/index.html
Module Make.Either
Source
Either type.
Either is the simplest and most generic sum/variant type: a value of ('a, 'b) Either.t
is either a Left (v : 'a)
or a Right (v : 'b)
.
It is a natural choice in the API of generic functions where values could fall in two different cases, possibly at different types, without assigning a specific meaning to what each case should be.
For example:
List.partition_map:
('a -> ('b, 'c) Either.t) -> 'a list -> 'b list * 'c list
If you are looking for a parametrized type where one alternative means success and the other means failure, you should use the more specific type Result.t
.
A value of ('a, 'b) Either.t
contains either a value of 'a
or a value of 'b
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>