Algorithms have always seemed to me easier to solve in an imperative mutable way. However, recently I had a look on how Scala implements some of the parallel collections and this gave me some ideas to try it out with F#.
scanLeftis really an interesting function. It cumulate a collection of intermediate cumulative results using a start value.
List(1, 5, 8).scanLeft(100)(_ + _) == List(100, 101, 106, 114)
To calculate the next value we need to know the previous one. This is the sequential definition but can the
scanLeft be made parallel? At first glance it seems impossible because:
If you are looking for a starter kit based on NPM scripts, supporting ASP.NET Core 2.1, React, Typescript, Webpack with Hot Module Replacement and other features, this article is for you.
The most obvious choice today for bootstraping a new React application is to use Facebook’s create-react-app (CRA) template (or create-react-app-typescript with Typescript support). However if you want to leverage ASP.NET Core you can use Microsoft template based on create-react-app.
For me create-react-app is really great until you need some more control over your dependencies and configuration, and you call
npm run eject which is one way operation. Then you…
It’s been 40 years since John Backus’ Turning Award lecture on 1977 “Can Programming Be Liberated from the von Neumann Style? A Functional Style and Its Algebra of Programs”. He described a functional-level programming language (not to be confused with functional programming) known as FP that he was working on.
This was a visionary article well ahead of its time. The point is, that he pinpointed a fundamental problem of thought in programming that is still valid 40 years after. …
Some time ago I took Coursera “Data Science” specialization. Data science is not something I get paid for professionally. It’s just a hobby so bear with me if I do some mistakes or if I use the wrong vocabulary.
This post is part of the F# Advent Calendar 2017 initiative — make sure to go check out rest of posts as well.
One of the homeworks I had to do for the specialization was to make the comparison of exponential distribution and Central Limit Theorem. At the time, I made the analysis with R language which was used throughout the…