Haskell left arrow list comprehension

I think <- is syntactic sugar in this situation, as opposed to an operator.

c <- s is a generator expression.

https://imada.sdu.dk/~rolf/Edu/DM22/F05/haskell-operatorer.pdf

1
2
3
import Data.Char (toUpper)

[toUpper c | c <- s]
1
2
3
print [1,2,3]
-- This is equivalent to
putStrLn $ show [1,2,3]
1
2
3
4
5
6
7
8
quicksort1 :: (Ord a) => [a] -> [a]
quicksort1 [] = []
quicksort1 (x:xs) =
  let smallerSorted = quicksort1 [a | a <- xs, a <= x]
      biggerSorted = quicksort1 [a | a <- xs, a > x]
  in  smallerSorted ++ [x] ++ biggerSorted

print quicksort1 [5,1,2,3]