Skip to content

Instantly share code, notes, and snippets.

@aavogt
Created February 18, 2023 01:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aavogt/e88abe27d7c9a36a0e5e5b7a5d40d531 to your computer and use it in GitHub Desktop.
Save aavogt/e88abe27d7c9a36a0e5e5b7a5d40d531 to your computer and use it in GitHub Desktop.
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeFamilies #-}
type family Remove v xs where
Remove x (x ': xs) = Remove x xs
Remove x (y ': xs) = y ': Remove x xs
Remove x '[] = '[]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment