Skip to content

Instantly share code, notes, and snippets.

@mattpodwysocki
Created March 8, 2009 23:09
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 mattpodwysocki/76001 to your computer and use it in GitHub Desktop.
Save mattpodwysocki/76001 to your computer and use it in GitHub Desktop.
-- Haskell
identity :: [a] -> [a]
identity xs = foldr (:) [] xs
// F#
let identity (xs:'a list) : 'a list = List.fold_right (::) [] xs;;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment