This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE NoMonomorphismRestriction #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE TupleSections #-} | |
{-# LANGUAGE ViewPatterns #-} | |
{-# LANGUAGE BangPatterns #-} | |
import Control.Monad | |
import Control.Monad.Random |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module MyCombinatorics where | |
import Data.List ( (\\), | |
sort) | |
import Control.Applicative ( liftA2, | |
Applicative, | |
pure) | |
(^*) :: (a -> b) -> (b -> c) -> a -> c | |
f ^* g = g . f |