func :qsort, [] { [] } func :qsort do | list | qsort( list.select {|a| a < list[0]} ) + list.select {|a| a == list[0]} + qsort( list.select {|a| a > list[0]} ) end
and if I find time it could become even some kind of "declarative like" unification algorithm... who knows. The point is I don't even know if I have enough time for the "toy" pattern matching.
[from the future: I did not find time!]
No comments:
Post a Comment