Hacker News new | past | comments | ask | show | jobs | submit login

@wheybags I recommend achieving defined-before-use quicksort by throwing in some unnecessary Haskell syntax extensions:

  qs :: Ord a => [a] -> [a]
  qs = \case
    [] -> []
    (x : (partition (< x) -> (qs -> as, qs -> bs))) -> as <> [x] <> bs



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: