Software, Ruby, @ Cisco. Aspiring functional programmer.
🤯
🤯
qsort [] = []
qsort (x:xs) = qsort smaller ++ [x] ++ qsort larger
where
smaller = [a | a <- xs, a <= x]
larger = [b | b <- xs, b > x]
qsort [] = []
qsort (x:xs) = qsort smaller ++ [x] ++ qsort larger
where
smaller = [a | a <- xs, a <= x]
larger = [b | b <- xs, b > x]
🥸
🥸
- I’ve always wanted that t-shirt
- I always figured I would like Superchunk
But I never did get a Superchunk album, ever.
Thanks for the playlist, here, @hotdogsladies.bsky.social
- I’ve always wanted that t-shirt
- I always figured I would like Superchunk
But I never did get a Superchunk album, ever.
Thanks for the playlist, here, @hotdogsladies.bsky.social
Rotate can be implemented with reverse.
Reverse can be implemented with swap.
It’s not going to be the most efficient, but I really like how this is composed of simpler, smaller algorithms…
Rotate can be implemented with reverse.
Reverse can be implemented with swap.
It’s not going to be the most efficient, but I really like how this is composed of simpler, smaller algorithms…