Sha256: c50ba07593d437ff0329b3ba83953ec489c41248bdadfb3f516f7abfb8baf781

Contents?: true

Size: 252 Bytes

Versions: 11

Compression:

Stored size: 252 Bytes

Contents

module Strings
  private
  def join(separator='')
    monoid(->(a, b) { "#{a}#{separator}#{b}" }, '')
  end

  def to_characters
    ->(string) { Sequence.new(character_enumerator(string)) }
  end

  def to_string
    ->(value) { value.to_s }
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
totally_lazy-0.1.34 lib/totally_lazy/strings.rb
totally_lazy-0.1.33 lib/totally_lazy/strings.rb
totally_lazy-0.1.32 lib/totally_lazy/strings.rb
totally_lazy-0.1.31 lib/totally_lazy/strings.rb
totally_lazy-0.1.30 lib/totally_lazy/strings.rb
totally_lazy-0.1.29 lib/totally_lazy/strings.rb
totally_lazy-0.1.28 lib/totally_lazy/strings.rb
totally_lazy-0.1.26 lib/totally_lazy/strings.rb
totally_lazy-0.1.25 lib/totally_lazy/strings.rb
totally_lazy-0.1.24 lib/totally_lazy/strings.rb
totally_lazy-0.1.23 lib/totally_lazy/strings.rb