Using Monads in C++ to Solve Constraints: 1. The List Monad Posted by Bartosz Milewski under C++, Functional Programming, Haskell, Monads, Programming [26] Comments I am sometimes asked by C++ programmers to give an example of a problem that can’t be solved without monads. This is the wrong kind of question — it’s like asking if there is a problem that can’t be solved without for loops. Obviously,
最近Haskellerの間で人気になりつつある(?)Operational Monadというものについての記事です。 サンプルプログラム Operational Monadは http://hackage.haskell.org/package/free-operational で定義されています。後でも説明しますがこれはFree Monadの構造をもったモナドになります。 以下のコードはhttps://gist.github.com/myuon/5737483に載せておきました。 {-# LANGUAGE GADTs #-} import Control.Monad import Control.Monad.Operational.Simple data Simple a where End :: Simple a Put :: String -> Simple () Get :: In
From Adjunctions to Monads I thought I would share one of my favorite constructions in Haskell, namely that adjoint functors give rise to monads. Although it’s a trivial result in category theory how it manifests in Haskell is quite lovely. A Functor in Haskell maps objects and morphism (i.e. functions) in a subcategory of Hask to objects and morphisms of another category.
Monads are often considered to be a stumbling block for learning Haskell. Somehow they are thought of as scary and hard to understand. They are however nothing more than a design pattern, and a rather simple one at that. Monads give us a standardized way to glue a particular kind of computations together, passing the result of each computation to the next. As such they are useful well beyond funct
Similarly to how Bryan O’Sullivan got side-tracked over five years ago, I recently found myself wishing a library existed to more easily deal with monad transformers. There are quite a few libraries that try and provide more convenient ways of dealing with monad transformers (typically using those defined in transformers so as to avoid re-defining them all the time and to provide inter-compatibili
The Haskell programming language community. Daily news and info about all things Haskell related: practical stuff, theory, types, libraries, jobs, patches, releases, events and conferences and more...
C++ Ranges are Pure Monadic Goodness Posted by Bartosz Milewski under C++, Functional Programming, Haskell, Monads, Programming [7] Comments We have this friendly competition going on between Eric Niebler and myself. He writes some clever C++ template code, and I feel the compulsion to explain it to him in functional terms. Then I write a blog about Haskell or category theory and Eric feels a comp
パーサーコンビネーターっていうのはオブジェクトをぺこぺこ結合することで望みのパーサーを合成できるっていう、そういったたぐいのもの。 (U^ω^)わんわんお! - @linerlockの日記 liner_lockさん作、Parseq 関数型言語ってこわい?C#erがLINQでパーサーに挑戦(1) - 猫とC#について書くmatarilloの雑記 私の記事。パート4まであります。 関数型言語ってこわい?C#erがLINQでパーサーに挑戦(1) - 猫とC#について書くmatarilloの雑記 関数型言語ってこわい?C#erがLINQでパーサーに挑戦(2) - 猫とC#について書くmatarilloの雑記 関数型言語ってこわい?C#erがLINQでパーサーに挑戦(3) - 猫とC#について書くmatarilloの雑記 関数型言語ってこわい?C#erがLINQでパーサーに挑戦(最終回) - 猫とC
Summary: I've just released a new version of Shake, with a --demo feature and an underlying continuation monad. I want to release v1.0 in the near future. I've just released a new version of the Shake build system, version 0.13.3. While the version number is only 0.0.1 higher, the changelog lists a large number of improvements. In particular, two changes are: The Action monad is now based on conti
Programování jako zábavná hra! Děti, ale i dospělí se mohou naučit kódovat velice přístupnou formou, která bude všechny bavit! Foto: Pixabay Základy programování Programování se může zdát jako složitá věda, ale s dnešními dostupnými nástroji se tomuto řemeslu může naučit každý. Samozřejmě záleží, jaké k tomu má kdo dispozice a kolik času je ochoten učení věnovat. Už ale dávno neplatí, že je progra
So, when you say something is a “free X” for some X, that is incomplete. Instead, the free structure is generated from something. For example, Nat is a free monoid, and in particular, it’s the free monoid on one generator (i.e. generated from a singleton set.) [Bool] would be the free monoid on two generators, and in general [T] is the free monoid generated by T. In category theory, this is witnes
Summary: Shake is a monadic build system, and monadic build systems are more powerful than applicative ones. Several people have wondered if the dependencies in the Shake build system are monadic, and if Make dependencies are applicative. In this post I'll try and figure out what that means, and show that the claim is somewhat true. Gergo recently wrote a good primer on the concepts of Applicative
12 July 2014 (programming haskell language) I've been thinking lately about arrows in relation to applicative functors and monads. The difference between the latter two is easy to intuit (and I'll describe it via an example below), but I never managed to get the same level of understanding about arrows. There's a somewhat famous paper about this question, which has a very clear-cut diagram showing
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く