CommunityNews

CommunityNews

Laziness: Clojure vs Haskell

Laziness: Clojure vs Haskell.
Last week I punted on randomness, and just made my genetic_search
function take a [Double]. While that was convenient, it is unfortunately not
as general as I thought at the time. I’m still in the process of learning
Haskell, and I got confused between laziness in Clojure and laziness in
Haskell.So how do they differ? The one-word answer is “purity”, but let me try to
expand on that a little bit. Clojure has the “seq” abstraction, which is
defined by the two functions first and next, where first gives you an
element and next gives you another seq if there are more elements to be
had, or nil if there are none. When I think of a lazy list, I think in
terms of Clojure seqs, even though Clojure lists are actually not lazy.

Read in full here:

This thread was posted by one of our members via one of our news source trackers.

Where Next?

Popular Backend topics Top

First poster: bot
Powerful, flexible, complex: The origins of C++ date back 40 years, yet it remains one of the most widely used programming languages toda...
New
New
First poster: AstonJ
Is Rust Used Safely by Software Developers?. Rust, an emerging programming language with explosive growth, provides a robust type syste...
New
CommunityNews
Multicore OCaml by kayceesrk · Pull Request #10831 · ocaml/ocaml. This PR adds support for shared-memory parallelism through domains and...
New
First poster: bot
For the first 8 or so years of my programming experience, while I was an undergraduate and later graduate student, working in the experim...
New
First poster: bot
Writing a Game Boy Emulator in OCaml. For the past few months, I have been working on a project called CAMLBOY, a Game Boy emulator that...
New
First poster: AstonJ
GitHub - redneckbeard/thanos: Ruby → Go at the snap of your fingers. Ruby → Go at the snap of your fingers. Contribute to redneckbeard/t...
New
First poster: bot
GitHub - tetratelabs/wazero: wazero: the zero dependency WebAssembly runtime for Go developers. wazero: the zero dependency WebAssembly ...
New
First poster: herbert
Why Rust should not have provided unwrap. I see the unwrap function called a lot, especially in example code, quick-and-dirty prototype ...
New
First poster: bot
not-common-lisp-to-julia.org. GitHub Gist: instantly share code, notes, and snippets.
New

Other popular topics Top

DevotionGeo
I know that these benchmarks might not be the exact picture of real-world scenario, but still I expect a Rust web framework performing a ...
New
PragmaticBookshelf
Design and develop sophisticated 2D games that are as much fun to make as they are to play. From particle effects and pathfinding to soci...
New
brentjanderson
Bought the Moonlander mechanical keyboard. Cherry Brown MX switches. Arms and wrists have been hurting enough that it’s time I did someth...
New
AstonJ
I ended up cancelling my Moonlander order as I think it’s just going to be a bit too bulky for me. I think the Planck and the Preonic (o...
New
Exadra37
I am asking for any distro that only has the bare-bones to be able to get a shell in the server and then just install the packages as we ...
New
Exadra37
Oh just spent so much time on this to discover now that RancherOS is in end of life but Rancher is refusing to mark the Github repo as su...
New
PragmaticBookshelf
Author Spotlight Jamis Buck @jamis This month, we have the pleasure of spotlighting author Jamis Buck, who has written Mazes for Prog...
New
Help
I am trying to crate a game for the Nintendo switch, I wanted to use Java as I am comfortable with that programming language. Can you use...
New
PragmaticBookshelf
Author Spotlight: VM Brasseur @vmbrasseur We have a treat for you today! We turn the spotlight onto Open Source as we sit down with V...
New
New