Maps to

Maps to

The maps to symbol, ↦, is a rightward arrow protruding from a vertical bar. It is used in mathematics and in computer science[1] to denote functions.


In the Unicode character set, the symbol is code point U+21A6.[3]


Other uses

The "Maps to" operator is useful when it is desirable to avoid assigning names to functions.

This can avoid possible misinterpretations due to poor naming conventions,[4] such as avoiding the following name conflict from these two functions existing in the same file or in the same mathematical proof:

  • func sqr:
    • Squares the input value
  • func sqr: .
    • Calculates the perimeter of a square when given an input side length.


See also

  • Arrow notation – e.g., , also known as map

References

  1. ^ Specifically Functional Programming
  2. ^ Mikušiak, Luboš; Miroslav Adámy; Thomas Seidmann (1997). "Publishing formal specifications in Z notation on world wide web". TAPSOFT '97: Theory and Practice of Software Development. Lecture Notes in Computer Science. Vol. 1214. pp. 871–874. doi:10.1007/BFb0030650. ISBN 978-3-540-62781-4.
  3. ^ Unicode Character 'RIGHTWARDS ARROW FROM BAR' (U+21A6)
  4. ^ See Lambda Functions in Python (programming language)

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.