class Erlang::EmptyList
A list without any elements. This is a singleton, since all empty lists are equivalent.
Licensing
¶ ↑
Portions taken and modified from github.com/hamstergem/hamster
Copyright (c) 2009-2014 Simon Harris Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@private
Public Instance Methods
empty?()
click to toggle source
# File lib/erlang/nil.rb, line 57 def empty? return true end
hash()
click to toggle source
@private
# File lib/erlang/nil.rb, line 40 def hash return Erlang::EmptyList.hash end
head()
click to toggle source
There is no first item in an empty list, so return `Undefined`. @return [Undefined]
# File lib/erlang/nil.rb, line 46 def head return Erlang::Undefined end
Also aliased as: first
improper?()
click to toggle source
# File lib/erlang/nil.rb, line 61 def improper? return false end
size()
click to toggle source
Return the number of items in this `List`. @return [Integer]
# File lib/erlang/nil.rb, line 67 def size return 0 end
Also aliased as: length
tail()
click to toggle source
There are no subsequent elements, so return an empty list. @return [self]
# File lib/erlang/nil.rb, line 53 def tail return self end