package telegraml

  1. Overview
  2. Docs
Telegram Bot API for OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v2.2.0.tar.gz
sha256=b07ec61353d3a245f81c4c510a41b58b75c5ea17f0b1bf3df22b1c3601bd45c4
md5=2fdd7c68eec4b7b904d9c4e536395a70

doc/telegraml/TelegramApi/Result/index.html

Module TelegramApi.ResultSource

Used for representing results of various actions where a success or failure can occur. Contains helper functions to implement a monadic and functorial interface.

Sourcetype 'a result =
  1. | Success of 'a
  2. | Failure of string

Stores the return value if a function succeeded or a string if the function failed

Sourceval return : 'a -> 'a result

Raise a normal value into a Success : result

Sourceval default : 'a -> 'a result -> 'a

Take the value of the result, if it succeeded, or the other argument by default and return that

Sourceval (>>=) : 'a result -> ('a -> 'b result) -> 'b result

Bind Successes through the given function

Sourceval (<$>) : ('a -> 'b) -> 'a result -> 'b result

Map Successes through the given function

OCaml

Innovation. Community. Security.