-
Kinds – Haskell
Haskell is a statically typed language with a powerful type system. To understand how types are constructed and related, we need to look beyond types themselves to a higher level of abstraction: kinds. Kinds describe the “types of types” and are essential for understanding features like polymorphism and higher-kinded types. This article dives into the…
-
Thunks – Haskell
In Haskell, the term “thunk” is fundamental to understanding how the language’s lazy evaluation model works. Thunks are what allow Haskell to defer computations until their results are actually needed. While they provide significant benefits, such as avoiding unnecessary computations and enabling infinite data structures, they can also lead to inefficiencies and issues like space…
-
Monoids – Haskell
Monoids are a fundamental concept in Haskell, often used in functional programming to model and work with combining operations. They provide a simple and elegant way to represent values that can be combined together in an associative manner, along with a neutral “identity” element. In this article, weβll explore what monoids are, how they work…
-
Newtype Keyword – Haskell
Haskell provides several ways to define custom types, including data, type, and newtype. Among these, the newtype keyword offers a lightweight way to create a new type that wraps an existing type. While it might seem similar to data or type at first glance, newtype has unique properties that make it both efficient and useful…
-
What’s the difference between functors and applicatives (applicative functors)?
In Haskell, both functors and applicative functors are abstractions for working with values in a context, such as Maybe, List, or IO. While they are closely related, applicative functors extend the capabilities of functors, enabling more complex operations that require multiple values in a context. Letβs explore the differences between the two concepts and how…
-
Applicative Functors – Haskell
Applicative functors, or simply Applicatives, are a fundamental concept in Haskell that bridge the gap between Functors and Monads. Applicative functors allow us to apply functions wrapped in a context (like Maybe, List, or IO) to values that are also wrapped in a context. They add a layer of flexibility to functional programming in Haskell,…
-
Tree Structures – Haskell
In Haskell, tree structures are a powerful way to organize hierarchical data, enabling efficient storage, retrieval, and manipulation of elements. Among tree structures, binary trees and especially binary search trees (BSTs) are widely used for their efficiency in operations like searching, inserting, and deleting data. This article will explain the basics of tree structures in…
-
Synchronous & Asynchronous Systems and The Importance of Time in Crypto
In the world of blockchain and cryptocurrency, time plays a pivotal role in ensuring the security, efficiency, and functionality of decentralized networks. The way time is managed affects everything from transaction processing to consensus mechanisms. In this context, the distinction between synchronous and asynchronous systems is critical, especially when it comes to ensuring that blockchain…
-
Functional Programming Language
Functional Programming Language is a type of programming language that emphasizes computation through functions and treats functions as first-class citizens. The primary characteristics of functional programming languages include: Examples of functional programming languages include Haskell, Erlang, Scala, Lisp, and F#. Relevance of Functional Programming to Cardano Cardano, a blockchain platform known for its research-first approach…
-
Decentralized Encrypted Assets (DEAs)
Decentralized Encrypted Assets (DEAs) refer to digital assets that are stored, managed, and transacted on decentralized networks with the added layer of encryption to protect data privacy and security. These assets are distributed across a blockchain network rather than controlled by a centralized entity, and they leverage encryption to ensure that sensitive data related to…