Skip to content

Instantly share code, notes, and snippets.

View ChristopherKing42's full-sized avatar

Christopher King ChristopherKing42

  • Milky Way Galaxy
View GitHub Profile
{-# LANGUAGE RankNTypes #-}
module ChurchList where
import Data.Monoid
import Prelude hiding (zipWith)
-- church encoding for pairs
newtype ChurchPair a b = CP { runCP :: forall c. (a -> b -> c) -> c }
comma :: a -> b -> ChurchPair a b