Logo da Alura
Data >

Course of Clojure: mutability with atoms and refs

Course summary

  • Use a variety of data structures such as vectors, lists, sets, queues and maps
  • Understand concurrency and parallel processing issues
  • Use atoms and transaction retry
  • Use partials, doseq, dotimes, juxt, future and other functions
  • Understand the difference between atoms and refs
  • Use the advantages and understand the difficulties of using refs

Target Audience

Those who want to code in Clojure on a daily basis

Related Content

Courses of Data

Last update

03/07/2020

Already a student?

Start the course now

8h

To conclusion

47

Activities

206

Minutes of video

225

Students in this course

9.1

Grade for this course

Certificate of participation

Instructors

Detailed content

  1. Vectors, Lists, Sets and Queues

    • Vector, list, set and queues
    • Simulating the 4 rows of the hospital
  2. The problem of concurrency and mutability

    • Setting a manual limit for the queue
    • The problem of several concurrent threads
  3. Atoms and retries

    • Atom and swap
    • Swap and pure functions
  4. Partials and refactoring

    • Partial and simplifying the code
    • Doseq and dotimes
  5. Functions with more complex effects

    • Transferring people in the hospital and a lot about threading
    • Immutability
    • Juxt, is it better?
    • Reviewing the transfer
  6. Refs and dosyncs

    • References, ref-set and alter
    • Transfers and synchronization blocks

Don't study with us yet?

Invest in your career!

Start now