Li

Lists in Clojure

3 exercises

About Lists

Key Learnings

  • Lists are collections.
  • Lists can be created using list or by using a single quote.
  • Clojure will try to evaluate lists, treating the first item as a function.
  • Core functions:
    • cons returns a list with the new item added to beginning.
    • first returns the first item from a list.
    • rest returns the list without the first item.
    • count returns the number of items in the list.
    • conj returns a list with items appended in it.

Additional Resources

Edit via GitHub The link opens in a new window or tab

Learn Lists

Practicing is locked

Unlock 1 more exercise to practice Lists