• home
  • about
  • all recipes
  • feed
Elixir

Elixir Recipes

    View recipes by category

    Concurrency

    • Monitoring a process

    • Connecting nodes on different machines

    • Connecting nodes on the same machine

    • Debug tracing

    • Sending and Receiving

    • Spawning processes

    • Parallel Map

    Collections

    • Iterating over all keys of the map while keeping key order

    • Finding matching elements in a list or a map

    • Using recursion to extract particular elements from a list

    • Build lists with sigils

    • Filtering collections

    Flow control

    • Pipelining operations

    Strings

    • Create an array containing the alphabet

    • Checking if a string includes a substring

    • Trim whitespace from strings

    • Convert anything to string

    • Slicing a string

    • Joining strings

    • Splitting a string

    • Regular expressions

    • String substitution

    Types

    • Custom types

    • Type Checking

    Functions

    • Anonymous functions in pipe chain

    • Option parameters with keyword lists

    • Capturing functions

    • Guard clauses

    • Default function parameters

    • Anonymous functions

    Iex

    • Cancel a multiline command

    • Retrieving values from history

    • Getting help

    Lists

    • List comprehension

    • List membership

    • List difference

    • List concatenation

    Characters

    • Integer code of a character

    Cli

    • Parsing command line arguments

    Mix

    • Configuration

    • Custom Mix Task

    • Project configuration

    Testing

    • Asserting exceptions

    • Doctests

    Documentation

    • Documentation with ExDoc

    Logging

    • Logging with Logger

    Modules

    • Functions that delegate to another module

    • Module attributes as constants

    • Mixins

    • Behaviours

    Iex

    • Persistent history in IEx

    • Debugging

    Protocols

    • Protocols

    Metaprogramming

    • Accumulating @annotations

    • Listing a Module's Functions

    • Bang Macro

    • Macros

    Hex

    • Writing and publishing libraries

    Floats

    • Convert floats to int

    Erlang

    • Inspecting an Erlang module

    • Using Erlang from Elixir

    Performance

    • Microbenchmarking

    • Inspecting the BEAM

    Random

    • Generate a random number

    Atoms

    • Convert atoms to strings

    Phoenix

    • List all Phoenix routes

    Files

    • Counting words in a file

    Debug

    • How to connect and debug Elixir or Phoenix App at Heroku?


    Made with by Yos Riady and awesome contributors