Mark Nichollskookerella.com·Jun 15, 2024Functional XSLT/XPath/XQuery - #4 Monad patternThe monad is probably the most written about functional pattern, it is famous for convoluted and obtuse explanations, but I will steal some of the better explanations and translate them into XSLT/XPath. (adapted directly from All About Monads - Haske...DiscussFunctional idioms in XSLT/XPath/XQueryXSLT
Luis Rodero-Merinolrodero.hashnode.dev·May 18, 2024A more intuitive approach to the State Monad in ScalaThe 'Functional programming in Scala' book (aka 'the red book') defines a state transformation as a function with this signature: S => (S, A) where S is a type representing the state of our application and A is the type of the output we get running ...DiscussScala
Ikechukwu Ezeblog.ikeze.dev·Mar 17, 2024Extending Kotlin's Null-Safety with Monad ComprehensionKotlin has a very decent null-safety baked in; and even better, it is a part of its type system. private fun easy1(str: String?): String { return str?.let { return "$str is so easy" } ?: "Not so easy after all" } // We can easily ca...Discuss·2 likes·1.2K readsKotlin
Mavmav.hashnode.dev·Mar 7, 2024Okay, I'll bite — what's Monad?This article was originally published on my website. If you've not been living under a rock, you've probably heard of Monad—the “next big thing” everyone's talking about. But, apart from the airdrop rumours, a cult-like following saying “gmonad” and ...DiscussMonad
Riki Phukonrikiphukon.hashnode.dev·Jan 3, 2024wtf is a MONAD?!A monad in X is a monoid in the category of endofunctors of X. I came across the term MONAD in a meme and when I googled. The above sentence was what I got. Not very helpful when you’re trying to learn about monads in functional programming isn’t it...DiscussTypeScript
Seb Wilgoszswilgosz.hashnode.dev·Dec 16, 2023Untangle your code with MORE than service objects! Meet dry-monads!Recently I wrote an article, where I've told about the decision process behind my attempt to replace Rails with Hanami in our microservices ecosystem and why I decided not to do it just yet. ❗ Please keep in mind that this statement was made before ...Discuss·51 readsdry-rb
Higashi Kotanap5.hashnode.dev·Sep 10, 2023Combining Promises and Error Handling in TypeScript Using neverthrowHandling asynchronous operations in TypeScript can benefit from a more type-safe and readable approach. In this article, we will explore a piece of code that demonstrates how to combine multiple asynchronous operations and handle their results in a t...Discuss·39 readsTypeScript
Kasozi Vincentkasozivincent.hashnode.dev·Aug 29, 2023The Maybe monad in C#Introduction Audience This blog post is targeted at intermediate-level C# programmers. Prerequisites This blog post assumes that the reader has a solid understanding of the following C# features. In case you don't, I suggest you look them up before p...Discuss·229 readsMonad
webbureaucratwebbureaucrat.hashnode.dev·Apr 17, 2023Parsing JSON in ReScript Part I: Prerequisites and RequirementsThere are few things more satisfying than a slick, readable, and safe JSON parser. It's one of the joys of functional programming. Using a good JSON parsing pipeline can feel like magic. This series seeks to lift the veil and empower readers (and, im...Discussrescript
webbureaucratwebbureaucrat.hashnode.dev·Apr 12, 2023Safer Data Parsing with Try MonadsI have written previously on maybe monads and how to use them with lists to eliminate the possibility of null references in an object-oriented programming language. This standalone post walks through how to use a more generalized kind of monad to pre...DiscussC#