Looking for elixir Keywords? Try Ask4Keywords

Elixir LanguageDes listes


Syntaxe

  • []
  • [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]
  • [tête | queue]
  • [1 | [2, 3, 4]] # -> [1,2,3,4]
  • [1 | [2 | [3 | [4 | []]]]] -> [1,2,3,4]
  • 'bonjour' = [? h,? e,? l,? l,? o]
  • keyword_list = [a: 123, b: 456, c: 789]
  • keyword_list [: a] # -> 123

Des listes Exemples Liés