of

Constructs a Result holding an Ok value.

This feature is experimental!

This API is still experimental, so it may change or be removed in future versions. You should not rely on it for production applications.

Signature

of(value)
forall a, b: (b) => Result a b

Documentation

Constructs a Result holding an Ok value.

Example:

const Result = require('folktale/result');

Result.of(1);
// ==> Result.Ok(1)

Properties

Source Code

Defined in source/result/result.js at line 327, column 22
of(value) {
    return Ok(value);
  }
Stability
experimental
Licence
MIT
Module
folktale/result/result
Authors
Copyright
(c) 2013-2017 Quildreen Motta, and CONTRIBUTORS
Authors
  • Quildreen Motta
Maintainers
  • Quildreen Motta <queen@robotlolita.me> (http://robotlolita.me/)