class Ramda::Internal::Functors::Maybe

The `Maybe` type represents the possibility of some value or nothing.

Public Class Methods

new(x) click to toggle source
# File lib/ramda/internal/functors.rb, line 45
def self.new(x)
  x.nil? ? None.new : Some.new(x)
end
of(x) click to toggle source
# File lib/ramda/internal/functors.rb, line 49
def self.of(x)
  Some.new(x)
end