Elixir - DailyTrip [001.5] Exercise

Links:

José Valim - How I Start (Elixir)

A nice introduction to Elixir covering Agents, Structs, and distribution.

Elixir School

Lessons about the Elixir programming language, inspired by Twitter’s Scala School.

Elixir Fountain

Bringing you the News & Interviews from around the Elixir Community.

Elixir's Getting Started Guide

The official guide for getting started with Elixir

Elixir docs

The official Elixir documentation.

hex.pm

The package manager for the Erlang ecosystem.

Exercise

For this week's exercise, we're going to build a small microservice that can be sent strings and will reply with those strings, upcased.

  • Create a new process in the same way that we did in the PingPong episode.
  • Send the process messages like {"some string", self}
  • The process should pattern match out the string and the process id from the 2-tuple in the message.
  • It should then call String.upcase on the provided string, responding with {:ok, "SOME STRING"}
  • Write a function that will send the message to the process and then immediately wait to receive the response back.

你可能感兴趣的:(Elixir - DailyTrip [001.5] Exercise)