Skip to content Skip to sidebar Skip to footer
Showing posts with the label Functional Programming

Monads Not With "flatmap" But "flatunit"?

Monads in category theory is defined by triples T, unit, flat⟩. class Monad t where map :: (a -&… Read more Monads Not With "flatmap" But "flatunit"?

Sum Array Of Arrays (matrix) Vertically Efficiently/elegantly

In Javascript, if I have an array of arrays representing a matrix, say x = [ [1,2,3,4], [5,… Read more Sum Array Of Arrays (matrix) Vertically Efficiently/elegantly

A Shorthand For Function.prototype.call.call?

Ways to call a function Consider this simple function: function my(p) { console.log(p) } I can cal… Read more A Shorthand For Function.prototype.call.call?

Why Are Higher Order Functions Hiding My Es6 Class Properties?

EDIT: I've added updated screenshots (at the end), for further clarification. I'm attemptin… Read more Why Are Higher Order Functions Hiding My Es6 Class Properties?

Referential Transparency In Functional Programming

I am new to JS and was learning functional programming and came across the term 'referential tr… Read more Referential Transparency In Functional Programming

Calculator On Javascript Functions

I have recently encountered a question during an interview to implement a calculator using functio… Read more Calculator On Javascript Functions

Pass Result Of Functional Chain To Function

If I have an array someArray that I first want to do some operations on and then pass that result t… Read more Pass Result Of Functional Chain To Function

Js Functions Composed In The Opposite Order

Starting with a simple function composition const fa = (x => (x + 'a')); const fb = (x =… Read more Js Functions Composed In The Opposite Order