Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Scheme (programming language)
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Equivalence predicates=== {{See also|relational operator}} Scheme has three different types of equivalence between arbitrary objects denoted by three different ''equivalence predicates'', relational operators for testing equality, <code>eq?</code>, <code>eqv?</code> and <code>equal?</code>: * <code>eq?</code> evaluates to <code>#f</code> unless its parameters represent the same data object in memory; * <code>eqv?</code> is generally the same as <code>eq?</code> but treats primitive objects (e.g. characters and numbers) specially so that numbers that represent the same value are <code>eqv?</code> even if they do not refer to the same object; * <code>equal?</code> compares data structures such as lists, vectors and strings to determine if they have congruent structure and <code>eqv?</code> contents.(R5RS sec. 6.1)<ref name="r5rs"/> Type dependent equivalence operations also exist in Scheme: <code>string=?</code> and <code>string-ci=?</code> compare two strings (the latter performs a case-independent comparison); <code>char=?</code> and <code>char-ci=?</code> compare characters; <code>=</code> compares numbers.<ref name="r5rs"/>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Scheme (programming language)
(section)
Add topic