There's a lot of type terminology and jargon going around when discussing types in Elm. This glossary attempts to list some of the most common type terms along with synonyms, terms from other language communities, examples, and links to more detailed articles on each topic.
Peter Naur's classic 1985 essay "Programming as Theory Building" argues that a program is not its source code. A program is a shared mental construct (he uses the word theory) that lives in the minds of the people who work on it. If you lose the people, you lose the program. The code is merely a written representation of the program, and it's lossy, so you can't reconstruct
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Card = Struct.new(:suite, :rank) do | |
include Comparable | |
def precedence() = [SUITES_SCORES[self.suite], RANKS_SCORES[self.rank]] | |
def rank_precedence() = RANKS_SCORES[self.rank] | |
def suite_precedence() = SUITES_SCORES[self.rank] | |
def <=>(other) = self.precedence <=> other.precedence | |
def to_s() = "#{self.suite}#{self.rank}" |
OlderNewer