Free Post Functional Programming The function Map() Today I would like to share last of small helper functions that help write concise code. Just like Apply, it helps to avoid null-checking ifs by conditionally applying a transformation

Free Post HackerRank Functional Challenges HR F#: Functions and Fractals: Sierpinski triangles The problem of drawing the Sierpinski triangles is considered to be advanced problem and it really is. The Sierpinski triangle is a fractal, constructed by recursively subdividing equilateral triangles into

Free Post HackerRank Functional Challenges HR F#: Pascal's Triangle The second problem from the Recursive subdomain is printing Pascal's Triangle for given n. Pascal's triangle is named after famous French mathematician from XVII century, Blaise Pascal. His findings on

Free Post HackerRank Functional Challenges HR F#: Computing the GCD The greatest common divisor (or GCD) of two integers is the largest positive integer that divides two of these integers. The first of the Recursion problems on the Functional track at Hackerrank is computing the GCD using the Euclidean Algorithm. In this algorythm the

Free Post F# Quickstart WPF F#-only app in VSCode - Part 3 How to quickly create WPF F# project was shown in the first part. FsXaml and paket was added in the second part. This part will go reactive: add ReactiveUI and show how to update the view model asynchronously from F#. This part starts where

Free Post F# Quickstart WPF F#-only app in VSCode - Part 2 The first part shown how to create a WPF F# project with simple window and its view model, build this project and run it. Now lets add FsXaml using packet, use it to create types from XAML and create user control. All by directly

Free Post HackerRank Functional Challenges HR F#: Compute the Area of a Polygon This is the last from the introductional problems in the Functional Programming domain on Hackerrank. This also might be most complicated among the introductionary problems: You are given the cartesian coordinates of a set of points in a 2D plane. When traversed sequentially, these

Free Post HackerRank Functional Challenges HR F#: Compute the Perimeter of a Polygon The problem of computing perimeter of the polygon is one of the easy problems, but it requires a bit more programming. You are given the cartesian coordinates of a set of points in a 2D plane. When traversed sequentially, these points form a Polygon,

Free Post HackerRank Functional Challenges HR F#: Functions or Not? The Functions or Not? problem is defined as follows: You are given a set of unique (x, y) ordered pairs constituting a relation. For each of these relations, identify whether they may possibly represent a valid function or not. On a new line for

Free Post HackerRank Functional Challenges HR F#: Lambda Calculus - Evaluating Expressions #2 The first λ-calculus evaluating expression problem was very easy. The second one is similar: Compute the value of (λx.x+1)((λy.y+2)3). Just to make a bit more fun from it, let's solve it by writing the code in F#: (fun

Free Post HackerRank Functional Challenges HR F#: Lambda Calculus - Reductions #4 The last one from reduction problems is following: Reduce the following expression, using the beta-rule, to no more than one term. If the expression cannot be reduced, enter "CAN'T REDUCE". (λg.((λf.((λx.(f(xx)))(λx.(f(xx)))))g)) Well, now I

Free Post HackerRank Functional Challenges HR F#: Lambda Calculus - Reductions #3 The third λ-calculus problem is a bit more advanced (although still simple): Reduce the following expression, using the beta-rule, to no more than one term. If the expression cannot be reduced, enter "CAN'T REDUCE". ((λx.(x x)) (λx.(x x))) "beta-reduction&

Free Post HackerRank Functional Challenges HR F#: Lambda Calculus - Reductions #2 The second λ-calculus problem is following: Reduce the following to no more than one term. If the expression cannot be reduced, enter "CAN'T REDUCE". ((λx.((λy.(x y)) x)) (λz.w)) Let's reduce the expressions: Framing parentheses are not required: (λx.((λy.

Free Post HackerRank Functional Challenges HR F#: Lambda Calculus - Reductions #1 The Lambda Calculus - Reductions #1 is rather unusual. Instead of submitting the code, the required submission is a shortening of the lambda-expression. Reduce the following expression to no more than one term. ... ((λx.(x y))(λz.z)) There is a nice introduction to