Тёмный

Fast F#: Intro to Defining Sequences 

Fast F#
Подписаться 2,2 тыс.
Просмотров 896
50% 1

Sequences are a beautiful abstraction over the enumeration of values. Take some time with me to explore how we define them in #fsharp and how they allow us to define an infinite number of values without consuming all the memory in our computers.
=== Contact ===
Email: hi@fastfsharp.com
Mastadon: mastodon.sdf.org/@fastfsharp
Twitter: / fastfsharp
=== Support ===
One-Time Donation: ko-fi.com/fastfsharp
Membership: ko-fi.com/fastfsharp/tiers
Commissions: ko-fi.com/fastfsharp/commissions
=== Tags ===
Tags: #fsharp, #dotnet

Наука

Опубликовано:

 

1 фев 2023

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 15   
@FastFSharp
@FastFSharp Год назад
What are some use cases that you can think of for being able to define an infinite series of values?
@Grimsleeper86
@Grimsleeper86 Год назад
Timers, listeners, and observable data (like sensor data) immediately come to mind.
@FastFSharp
@FastFSharp Год назад
@@Grimsleeper86 great idea!
@Chris-pw7xm
@Chris-pw7xm Год назад
Applying a bitmask on a list. Mostly using Seq.unfold when generating things.
@greggy_b
@greggy_b Год назад
I hadn't thought of this before, but they may make a cool control structure for retry logic (e.g. for network requests). You can define a retry backoff strategy as a seq of sleep times (e.g. no backoff could be an infinite series of 5 seconds, or an exponential backoff could double the number of seconds in each item of the seq). Then you define a little wrapper that will sleep N seconds then try a function, returning an option of its result type. Then you can use Seq.pick to get the first Some result. So long as the trying function returns None, the wrapper will continue consuming one item of the seq, sleeping for that long, then running the try function again.
@BryanSlatner
@BryanSlatner Год назад
Generating primes and Fibonacci for project Euler problems.
@TheJessejunior
@TheJessejunior 2 месяца назад
man i'd love to see computation expressions explained by you.
@IltayDev
@IltayDev Год назад
Now, I am thinking about combining yield! and seq, it can be used in math if we want the sum of series that contains (-1)^n, we can create a seq by using yield! and list that contains two items first one for odd numbers and second one for even numbers of n
@JustinSkeen
@JustinSkeen Год назад
Syllabus? This is a class? I'm outta... 🤣🤣 Just kidding. I'm really like your narration and thought you have put into lessons.
@FastFSharp
@FastFSharp Год назад
Thanks 😊
@Unaimend
@Unaimend Год назад
ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-lSCTXACMAOE.html The slack sound confused the heck out of me :)
@FastFSharp
@FastFSharp Год назад
Yeah, I noticed that after it went up. I've since changed my recording settings to not record system sound.
Далее
Fast F#: Intro to Sets
12:20
Просмотров 546
Fast F#: Intro to Options
23:30
Просмотров 662
Я нашел кто меня пранкует!
00:51
치토스로 체감되는 요즘 물가
00:16
Просмотров 4,5 млн
Domain Modelling & The Power of F#
37:11
Просмотров 1,4 тыс.
Fast F#: Intro to Active Patterns
25:21
Просмотров 1,4 тыс.
25 Nooby Pandas Coding Mistakes You Should NEVER make.
11:30
Fast F#: Mapping Domain to Indexes
23:59
Просмотров 994
Fast F#: Intro to Arrays
19:21
Просмотров 562
Will the battery emit smoke if it rotates rapidly?
0:11