package octez-proto-libs
Octez protocol libraries
Install
Dune Dependency
Authors
Maintainers
Sources
tezos-octez-v20.1.tag.bz2
sha256=ddfb5076eeb0b32ac21c1eed44e8fc86a6743ef18ab23fff02d36e365bb73d61
sha512=d22a827df5146e0aa274df48bc2150b098177ff7e5eab52c6109e867eb0a1f0ec63e6bfbb0e3645a6c2112de3877c91a17df32ccbff301891ce4ba630c997a65
doc/octez-proto-libs.protocol-environment/Tezos_protocol_environment/V8/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)"
>