of

Constructs a Result holding an Ok value.

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
stable
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/)