Elixir Language Lists

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Syntax

  • []
  • [1, 2, 3, 4]
  • [1, 2] ++ [3, 4] # -> [1,2,3,4]
  • hd([1, 2, 3, 4]) # -> 1
  • tl([1, 2, 3, 4]) # -> [2,3,4]
  • [head | tail]
  • [1 | [2, 3, 4]] # -> [1,2,3,4]
  • [1 | [2 | [3 | [4 | []]]]] -> [1,2,3,4]
  • 'hello' = [?h, ?e, ?l, ?l, ?o]
  • keyword_list = [a: 123, b: 456, c: 789]
  • keyword_list[:a] # -> 123


Got any Elixir Language Question?