Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
dTub
Скачать

The Traverse type class in Cats - Scala tutorial

Автор: Jakub Kozłowski

Загружено: 2019-09-15

Просмотров: 4470

Описание:

Read the BTW at the end of the description!

In this video, you'll see what the Traverse type class is and what it allows you to do. You'll see some examples of traversable functors like List, Option and NonEmptyList, as well as applicative functors you can traverse to - IO, Option, Either, Validated and Map*.

Table of contents:
0:00 - Introduction, Traverse and `sequence`
0:41 - `Future.sequence` as a special case
3:46 - Traversing a list of IO with `sequence`
7:42 - Generalization of `sequence - `traverse`
9:28 - traversing non-lists - Traverse[Option]
10:00 - the intuition of what Traverse means
10:40 - traversing to different types
11:12 - sequencing a list of Option
12:48 - sequencing a list of Either
14:04 - accumulating failures with Validated
14:46 - NonEmptyList semigroup
15:50 - a word on the power of Traverse and guiding behavior by the instance of Applicative
17:07 - traversing with the Map applicative*
18:16 - NonEmptyTraverse and Apply - why we can still traverse with Map
21:32 - closing words

Read the code: https://github.com/kubukoz/videos/tre...

Previous videos:
Resource -    • Resource composition in cats-effect with t...  
Bracket -    • Basic resource management with Bracket in ...  
Blocker -    • Using Blocker in cats-effect 1.4.0 - Scala...  

Learn more about:
Traverse: https://typelevel.org/cats/typeclasse...
Applicative: https://typelevel.org/cats/typeclasse...
More traversals in a talk by Luka:    • Luka Jacobovitz - TRAVERSALS FOR ALL OCCAS...  
Traversing with Const: https://typelevel.org/cats/datatypes/...

*BTW*:

There's a small mistake in the video, irrelevant to traversals - `List.range(1, 10)` contains 9 elements, not 10 :)

Also, the file I work in is called ResourceDemo as it's a fork of the previous video's file - hopefully it doesn't bring much confusion.

- Map doesn't really have a full applicative but it has Apply, which is just Applicative without `pure`, so we can `nonEmptyTraverse` with it.

The Traverse type class in Cats - Scala tutorial

Поделиться в:

Доступные форматы для скачивания:

Скачать видео mp4

  • Информация по загрузке:

Скачать аудио mp3

Похожие видео

Using Tagless Final with laws - Scala tutorial

Using Tagless Final with laws - Scala tutorial

Monads are Monoids in the Category of Endofunctors - a Scala 3 Journey, No Psychobabble

Monads are Monoids in the Category of Endofunctors - a Scala 3 Journey, No Psychobabble

Save your Scala apps from the LazyValpocalypse, with Łukasz Biały!

Save your Scala apps from the LazyValpocalypse, with Łukasz Biały!

Cats with Scala: Essential Type Class Hierarchy, Explained

Cats with Scala: Essential Type Class Hierarchy, Explained

Pure Functional Database Programming with Fixpoint Types—Rob Norris

Pure Functional Database Programming with Fixpoint Types—Rob Norris

Semigroups and Monoids in Scala

Semigroups and Monoids in Scala

Intro to Cats-Effect (Gavin Bisesi)

Intro to Cats-Effect (Gavin Bisesi)

Scala Functional Composition and the Kleisli with Scalaz and Cats (Live coding by example)

Scala Functional Composition and the Kleisli with Scalaz and Cats (Live coding by example)

The Parallel typeclass in Cats - Scala tutorial

The Parallel typeclass in Cats - Scala tutorial

Keynote: Daniel Spiewak - The Case For Effect Systems

Keynote: Daniel Spiewak - The Case For Effect Systems

Practical Cats - Singapore Scala Programmers

Practical Cats - Singapore Scala Programmers

Functional stream processing with Scala - Fs2 Crash Course

Functional stream processing with Scala - Fs2 Crash Course

Declarative Control Flow with fs2 Stream – Fabio Labella

Declarative Control Flow with fs2 Stream – Fabio Labella

Functional Error Handling and Validation with Cats

Functional Error Handling and Validation with Cats

Tutorial: Typeclasses in Scala with Dan Rosen

Tutorial: Typeclasses in Scala with Dan Rosen

The Making of an IO - Daniel Spiewak

The Making of an IO - Daniel Spiewak

Adopting Cats - Ron Aharoni

Adopting Cats - Ron Aharoni

scale.bythebay.io: Rob Norris, Functional Programming with Effects

scale.bythebay.io: Rob Norris, Functional Programming with Effects

John A. De Goes at #ScalaUA - Thinking Functionally

John A. De Goes at #ScalaUA - Thinking Functionally

John De Goes - 12 Steps To Better Scala (Part I)

John De Goes - 12 Steps To Better Scala (Part I)

© 2025 dtub. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]