All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

Introduction to Erlang: Single Assignment and Pattern Matching

By

pasxizeis

29d ago· 8 min readen

Summary

This is part 2 of a series introducing Erlang, a functional programming language. The article focuses on two core concepts: single assignment (variables cannot be changed once bound) and pattern matching (the = operator performs pattern matching rather than traditional assignment). The content explains these concepts with code examples, showing how Erlang treats variables mathematically and how pattern matching works as a fundamental language mechanism.

Key quotes

· 3 pulled
In Erlang we should think variables in a mathematical sense of the term, which means that once you've bound a variable, you cannot change its value.
If you state that X is 5, then it will always be 5 (a variable is called bound if already contains a value, unbound otherwise)
In Erlang, the = operator does actually pattern matching
Snippet from the RSS feed
It’s been a while since the last post which was a short introduction into functional programming in general and now it’s time to dive into some of the basic concepts of the language.

You might also wanna read