Skip to content

Rocket Seat - Ignite - Elixir - Demo program that sums all elements of a list.

Notifications You must be signed in to change notification settings

librity/ignite_sum_over_list

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SumOverList

A demo Elixir program that sums over a list. Part of Rocket Seat Ignite, an online Elixir and Phoenix bootcamp.

Bash Commands

$ mix new project_name
$ mix compile
$ mix test
$ mix format
$ iex -S mix

Elixir Commands

> SumOverList.call([1, 2, 34, 5])
42
> Factorial.compute(6)
720
> Enum.map(%{a: 1, b: 2}, fn x -> x end)
[a: 1, b: 2]
> Enum.map(%{a: 1, b: 2}, fn {key, value} -> {key, value} end)
[a: 1, b: 2]
> Enum.map(%{a: 1, b: 2}, fn {_key, value} -> value end)
[1, 2]

Docs

Resources

About

Rocket Seat - Ignite - Elixir - Demo program that sums all elements of a list.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages