lib/dry/monads/list.rb
# Wraps a value with a list.
#
# @param value [Object] any object
# @return [List]
Wraps a value with a list.
Wraps a value with a list .
def pure(value = Undefined, type = nil, &block)
          if value.equal?(Undefined)
            new([block])
          elsif block
            new([block], value)
          else
            new([value], type)
          end
        end
def pure ( value = Undefined , type = nil , & block ) if value . equal? ( Undefined ) new ( [ block ] ) elsif block new ( [ block ] , value ) else new ( [ value ] , type ) end end
Wraps a value with a list.
Wraps a value with a list .
None
List
value
None
type
<not_specific>
block
<not_specific>