class Ramda::Internal::Functors::Const

`const` is a functor that effectively ignores the function given to `map`.

Attributes

value[R]

Public Class Methods

new(value) click to toggle source
# File lib/ramda/internal/functors.rb, line 18
def initialize(value)
  @value = value
end
of(x) click to toggle source
# File lib/ramda/internal/functors.rb, line 8
def self.of(x)
  new(x)
end

Public Instance Methods

map(*) click to toggle source
# File lib/ramda/internal/functors.rb, line 12
def map(*)
  Const.of(@value)
end