by drwh0 · 17y ago · 0 comments
quicksort:
qsort [] = []
qsort (x:xs) = qsort (filter (<= x) xs) ++ [x] ++ qsort (filter (> x) xs)
fib sequence:
fiblist = 0 : 1 : (zipWith (+) fiblist (tail fiblist))
but don't worry, with the rate at which the java kitchen sink swallows more paradigms, this will likely compile in java8 or something
So the paradigm is easily replicated, but yes, the syntax is totally ugly though ;) I think the real difficulty is in explaining how say lots of Comparators and Function classes are better or worse than a first-class function. Java at least affords type-safety on the wrapped functions whereas Ruby and Python don't (though, they don't really have any Java-style type safety to begin with).
I'm not proficient enough in Haskell to write a public blog post on it though; and I figure Lisp was esoteric enough ;-)