https://github.com/librity/ignite_list_length
Rocket Seat - Ignite - Elixir - Challenge 1 - A simple module that calculates the size of a list.
https://github.com/librity/ignite_list_length
challenge elixir ignite rocketseat
Last synced: 2 months ago
JSON representation
Rocket Seat - Ignite - Elixir - Challenge 1 - A simple module that calculates the size of a list.
- Host: GitHub
- URL: https://github.com/librity/ignite_list_length
- Owner: librity
- Created: 2021-03-09T05:43:01.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-02-25T12:05:36.000Z (over 4 years ago)
- Last Synced: 2025-11-18T23:03:06.045Z (7 months ago)
- Topics: challenge, elixir, ignite, rocketseat
- Language: Elixir
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ListLength
A simple module that calculates the size of a list with tail-call-optimized
recursion.
## Commands
```bash
$ mix test
$ iex -S mix
```
```elixir
> ListLength.call([1, 2, 34])
3
> ListLength.call([1, 2, 34, 5, 5, 6])
6
> ListLength.call([])
0
```