並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 3 件 / 3件

新着順 人気順

monoidの検索結果1 - 3 件 / 3件

タグ検索の該当結果が少ないため、タイトル検索結果を表示しています。

monoidに関するエントリは3件あります。 HotEntryプログラミングHaskell などが関連タグです。 人気エントリには 『The stack monoid revisited』などがあります。
  • The stack monoid revisited

    This is a followup to my previous post on the stack monoid, but is intended to be self-contained. Motivation: tree structured data GPUs are well known for being efficient on array-structured data, where it is possible to operate on the elements of the array in parallel. That last restriction doesn’t mean that the operations have to be completely independent; it’s also well known that GPUs are good

    • Ap Monoid

      > f = fmap concat . sequence > e1 = [Just [1,2], Just [3,4]] > e2 = [Just [1,2], Just [3,4], Nothing] > f e1 Just [1,2,3,4] > f e2 Nothing 次に、この f = fmap concat . sequence をもっと短くカッコよく書けないかな?と考えます。 何となく mconcat で置き換えれそうな気がしたんですよ・・・。 だけど、動作が変わってしまうんです・・・。

      • Monoidクラスのインスタンスにすることがうまくいかない

        1newtype MyAny = MyAny {getMyAny :: Bool} deriving (Eq,Ord,Read,Bounded,Show) 2 3instance Monoid MyAny where 4 mempty = MyAny False 5 MyAny u `mappend` MyAny v = MyAny (u || v) と書いたファイルをghciに読み込ませると file13.hs:22:10: error: • No instance for (Semigroup MyAny) arising from the superclasses of an instance declaration • In the instance declaration for ‘Monoid MyAny’ | 22 | instance Monoid MyAny where

          Monoidクラスのインスタンスにすることがうまくいかない
        1

        新着記事