http://qs321.pair.com?node_id=1216277


in reply to [Perl 6] Re: A more elegant way to filter a nested hash?
in thread A more elegant way to filter a nested hash?

With apologies if you're not interested in a P6 solution.

As long as you're writing code in languages other than the one the OP presented, would you mind writing up the Inline Haskell version as well? Nested zippers are interesting. Otherwise, I'd personally like to see the Inline Javascript version using the new ES6 destructuring syntax.

Replies are listed 'Best First'.
Re^2: [Perl 6] Re: A more elegant way to filter a nested hash?
by liz (Monsignor) on Jun 11, 2018 at 14:10 UTC
    I would suggest that people who know how to present a certain algorithm, would do so in the language they are fluent in. Since you appear you know what you're talking about, I would suggest that you provide the Haskell and Inline Javascript versions. So that we can all learn from it, rather than getting a lesson in being sarcastic.
      I would suggest that people who know how to present a certain algorithm, would do so in the language they are fluent in.

      "Write it in a different language" is about as sarcastic answer to the question "How can I do this more elegantly?" as I can imagine, because "I'm interested in these things so you should be too" seems selfish.