https://github.com/mohammadhasanii/mathematics-erlang
Erlang is a functional programming language and is used for real-time communication. This simple package is used to distinguish even and odd numbers
https://github.com/mohammadhasanii/mathematics-erlang
erlang erlang-otp evenorodd haskell mathematics
Last synced: about 2 months ago
JSON representation
Erlang is a functional programming language and is used for real-time communication. This simple package is used to distinguish even and odd numbers
- Host: GitHub
- URL: https://github.com/mohammadhasanii/mathematics-erlang
- Owner: mohammadhasanii
- Created: 2023-04-20T08:53:21.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-11-01T15:20:19.000Z (over 2 years ago)
- Last Synced: 2025-06-15T09:04:12.795Z (about 1 year ago)
- Topics: erlang, erlang-otp, evenorodd, haskell, mathematics
- Language: Erlang
- Homepage: https://www.erlang.org/
- Size: 1.95 KB
- Stars: 7
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Mathematics-Erlang
Erlang is a functional programming language and is used for real-time communication. This simple package is used to distinguish even and odd numbers
_(1).jpg)
## Usage/Examples
math_functions.erl
```
-module(math_functions).
-export([even/1, odd/1]).
even(X) when X >= 0 -> (X band 1) == 0.
odd(X) when X > 0 -> not even(X).
```
## Compile the application
Run the "erl" commands in your bash line to start the Erlang engine
```bash
Erlang/OTP 24 [erts-12.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit]
1> c (math_functions).
{ok,math_functions}
2> math_functions:even(12).
true
3> math_functions:odd(12).
false
```
## Erlang/OTP Documentation
[Erlang/OTP Documentation](https://www.erlang.org/docs)