Skip to content

Instantly share code, notes, and snippets.

@kkweon
Created August 31, 2017 13:01
Show Gist options
  • Select an option

  • Save kkweon/d44656a9b41cfa98f7636b90cc6ef1ea to your computer and use it in GitHub Desktop.

Select an option

Save kkweon/d44656a9b41cfa98f7636b90cc6ef1ea to your computer and use it in GitHub Desktop.

Haskell Presentation

What is a haskell

putStrLn "Hello World"

Quick Sort

:{
let quicksort :: (Ord a) => [a] -> [a]
    quicksort [] = []
    quicksort (x:xs) =
      let smallerSorted = quicksort [a | a <- xs, a <= x]
          biggerSorted = quicksort [a | a <- xs, a > x]
      in smallerSorted ++ [x] ++ biggerSorted
:}

quicksort [5, 4..1]

Embed Video

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment