Your Turn

Programming Elixir ≥ 1.6 — by Dave Thomas (63 / 230)

👈 Reducing a List to a Single Value | TOC | More Complex List Patterns 👉

  • Exercise: ListsAndRecursion-1
  • Write a mapsum function that takes a list and a function. It applies the function to each element of the list and then sums the result, so
  • ​ ​iex>​ MyList.mapsum [1, 2, 3], &(&1 * &1) ​ 14
  • Exercise: ListsAndRecursion-2
  • Write a max(list) that returns the element with the maximum value in the list…

--

--

--

We create timely, practical books and learning resources on classic and cutting-edge topics to help you practice your craft and accelerate your career.

Recommended from Medium

Installing Docker on Ubuntu 16.04

JAX London ‘19 ~ The Highlights (I)

My first week at Everest Engineering

READ/DOWNLOAD%& The Professional Product Owner: Le

Exception Handling

Invarch — Development Updates Initiated Over The Course OF The Week (17th to 22nd)

Open Beta Will Be Closed in 24 Hours, Don’t Miss the Last Chance to Get Free NFTs & Whitelist!

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
The Pragmatic Programmers

The Pragmatic Programmers

We create timely, practical books and learning resources on classic and cutting-edge topics to help you practice your craft and accelerate your career.

More from Medium