News for hackers. Stuff that matters.
Re:Haskell vs. Ada vs. C++ vs. an Experiment in Software Pro... by shawn_w on Wednesday December 18, 2024 @04:34PM (#42455567)
I think any language that has a flatmap type construct would also have filter functions that would be a lot clearer to read and write...

    (remove-if #'evenp '(1 2 3))
vs

    (mapcan
      (lambda (n) (if (evenp n) '() (list n)))
      '(1 2 3))
in Common Lisp for example.

(Yes I know the original is just a contrived example that you shouldn't read too much into, but...)

There are no comments on this comment yet.