Skip to content

Instantly share code, notes, and snippets.

Avatar

Brad Clawsie bradclawsie

View GitHub Profile
View gist:5a2cc1c52824679c41e8
package main
import (
"bufio"
"compress/gzip"
"fmt"
"io"
"io/ioutil"
"log"
"net/http"
View StringCollapse.hs
{-# LANGUAGE TupleSections #-}
module Main where
-- see https://plus.google.com/u/0/105746006385940131491/posts/9Uev6KVRUgK for
-- context
-- what we essentially have is a non-associative operation (represented by
-- concatenation):
--
-- ab = ba = c
-- bc = cb = a