-
Write a function in a module that takes a map with :name and prints out the value with a "-NG" appended to it since it's the NextGeneration ;) -- Ensure it takes only maps that contain the :droid atom which is true
-
Write another function (with the same name) with the (almost) same arguments that takes any name and returns it if the :droid value is false
- Write an & function using &1.... and sums 4 values
- Answer
- Write an function called greeter that returns a function that takes differing types and values and prints out a different response to each. Try a map, a three element tuple, an :atom and a string. It should also take a fallthrough default value that returns :ok
- Answer
- read up on Enum.reduce. Inside of iex How can you combine Enum.map and Enum.reduce to take a list of numbers, double each of them and then sum them up. Try the numbers 1,2,3,4 - that way you'll know the answer (20) and if you got it correct
- Answer