An open API service indexing awesome lists of open source software.

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.

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
```