Skip to content

Instantly share code, notes, and snippets.

@ilovejs
Created August 16, 2014 14:45
Show Gist options
  • Save ilovejs/a7a477a95ec858b1443e to your computer and use it in GitHub Desktop.
Save ilovejs/a7a477a95ec858b1443e to your computer and use it in GitHub Desktop.
haskell bootstrap code 2
module Main where
--Find the last but one element of a list.
--Prelude> myButLast [1,2,3,4]
--3
myButLast :: [a] -> a
myButLast = take 2http://localhost:63342/react/examples/basic-commonjs/index.html
main = do
print (myButLast [1,3,4])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment