quicksort :: (Ord a) => [a] -> [a]
quicksort [] = []
quicksort (x:xs) =
let smallerSorted = quicksort (filter (<=x) xs)
biggerSorted = quicksort (filter (>x) xs)
in smallerSorted ++ [x] ++ biggerSorted
我的问题是,两个filter(smaller和bigger)是一次操作呢,还是分两次操作的?谢谢
--
-- You received this message because you are subscribed to the Google Groups Shanghai Linux User Group group. To post to this group, send email to sh...@googlegroups.com. To unsubscribe from this group, send email to shlug+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/shlug?hl=zh-CN
---
您收到此邮件是因为您订阅了 Google 网上论坛的“Shanghai Linux User Group”论坛。
要退订此论坛并停止接收此论坛的电子邮件,请发送电子邮件到 shlug+un...@googlegroups.com。
要查看更多选项,请访问 https://groups.google.com/groups/opt_out。
您收到此邮件是因为您订阅了 Google 网上论坛“Shanghai Linux User Group”中的主题。
要退订此主题,请访问 https://groups.google.com /d/topic/shlug/wYNMYdlSPs4/unsubscribe。
要退订此论坛及其所有主题,请发送电子邮件到 shlug+un...@googlegroups.com。