def select(&block)
      raise Erlang::ImproperListError if improper?
      return enum_for(:select) unless block_given?
      out = tail = Erlang::Cons.allocate
      list = self
      while !list.empty?
        if yield(list.head)
          new_node = Erlang::Cons.allocate
          new_node.instance_variable_set(:@head, list.head)
          new_node.instance_variable_set(:@improper, false)
          tail.instance_variable_set(:@tail, new_node)
          tail.instance_variable_set(:@improper, false)
          tail.immutable!
          tail = new_node
          list = list.tail
        else
          list = list.tail
        end
      end
      if not tail.immutable?
        tail.instance_variable_set(:@tail, Erlang::Nil)
        tail.immutable!
      end
      return out.tail
    end
def select(&block)
      raise Erlang::ImproperListError if improper?
      return enum_for(:select) unless block_given?
      out = tail = Erlang::Cons.allocate
      list = self
      while !list.empty?
        if yield(list.head)
          new_node = Erlang::Cons.allocate
          new_node.instance_variable_set(:@head, list.head)
          new_node.instance_variable_set(:@improper, false)
          tail.instance_variable_set(:@tail, new_node)
          tail.instance_variable_set(:@improper, false)
          tail.immutable!
          tail = new_node
          list = list.tail
        else
          list = list.tail
        end
      end
      if not tail.immutable?
        tail.instance_variable_set(:@tail, Erlang::Nil)
        tail.immutable!
      end
      return out.tail
    end
Return a `List` which contains all the items for which the given block
 returns true.

 @example
   Erlang::List["Bird", "Cow", "Elephant"].select { |e| e.size >= 4 }
   # => Erlang::List["Bird", "Elephant"]

 @return [List]
 @yield [item] Once for each item.