# Tag Archives: monoid

## Counting inversions with monoidal sparks

Time for me to reveal the example I had in mind that led to the generalization in my previous post. Thanks for all the interesting comments: it seems like there are some interesting connections to be explored (e.g. to the … Continue reading

Posted in math | | 8 Comments

## Monoidal sparks

While at ICFP in St. Louis this past week, I discovered an interesting construction on monoids that no one I talked to (including Kenny Foner and Edward Kmett) seemed to have heard of or thought about before. In this post I’ll … Continue reading

Posted in math | Tagged , , , , | 27 Comments

## New Haskell Symposium paper on “twisted functors”

Satvik Chauhan, Piyush Kurur and I have a new paper which will appear at the 2016 Haskell Symposium in Japan: How to Twist Pointers without Breaking Them Although pointer manipulations are used as a primary motivating example, at heart the … Continue reading

## A strange representation of Z6

On my other blog I am writing about a proof of the Lucas-Lehmer test, and today in the course of working up some examples I stumbled across this little gem. Let be a monoid, and let denote the subset of … Continue reading

Posted in math | Tagged , , , | 11 Comments

## Themes on Streams

> {-# LANGUAGE DeriveFunctor, FlexibleInstances #-} Recall that a stream is a countably infinite sequence of values: > data Stream a = a :> Stream a > deriving (Functor, Show) > > sHead (a :> _) = a > sTail … Continue reading

Posted in haskell, math | Tagged , , , , , | 3 Comments

## Monoids for Maybe

The other day I had two lists of monoidal values that I wanted to combine in a certain way, and I realized it was an instance of this more general pattern: > {-# LANGUAGE GeneralizedNewtypeDeriving #-} > import Data.Monoid > … Continue reading

## Collecting attributes

I’m proceeding with the redesign of my diagrams library slowly but surely. I don’t have a lot of time to work on it, hence the “slowly”. But progress is being made. It’s still very much in the design phase, which … Continue reading