Current section
Files
Jump to
Current section
Files
lib/data/counted.ex
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
# Version 2, December 2004
#
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
# TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
#
# 0. You just DO WHAT THE FUCK YOU WANT TO.
defprotocol Data.Counted do
@spec count(t) :: non_neg_integer
def count(self)
end
defimpl Data.Counted, for: List do
def count(self) do
length(self)
end
end