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

CommunityNews
A new study looks into the dematerialized office, where sensorial experiences such as touch, taste, smell, and sensations of hot or cold ...
New
First poster: bot
nim-lang/Nim. Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages lik...
New
First poster: bot
This blog post walks you through how to implement a time-series database engine based on what I’ve learned from my experience of writing ...
New
CommunityNews
Avoid Yoda conditions in Perl you should—The Phoenix Trap. Assign not when mean to compare you do. Help you warnings and strictures can.
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
I am often fascinated by old tech. While I do not have the experience nor the expertise on the subject, in the last months, some very sp...
New
CommunityNews
C++ Cheat Sheets & Infographics. Graphics and cheat sheets, each capturing one aspect of C++: algorithms/containers/STL, language ba...
New
First poster: bot
GitHub - nim-works/nimskull: An in development statically typed systems programming language; with sustainability at its core. We, the co...
New
First poster: bot
Introducing Trilogy: a new database adapter for Ruby on Rails | The GitHub Blog. We’ve open sourced Trilogy, the database adapter we use...
New
First poster: bot
not-common-lisp-to-julia.org. GitHub Gist: instantly share code, notes, and snippets.
New

Other popular topics Top

AstonJ
You might be thinking we should just ask who’s not using VSCode :joy: however there are some new additions in the space that might give V...
New
AstonJ
I’ve been hearing quite a lot of comments relating to the sound of a keyboard, with one of the most desirable of these called ‘thock’, he...
New
AstonJ
Just done a fresh install of macOS Big Sur and on installing Erlang I am getting: asdf install erlang 23.1.2 Configure failed. checking ...
New
Rainer
Not sure if following fits exactly this thread, or if we should have a hobby thread… For many years I’m designing and building model air...
New
PragmaticBookshelf
Learn different ways of writing concurrent code in Elixir and increase your application's performance, without sacrificing scalability or...
New
PragmaticBookshelf
“A Mystical Experience” Hero’s Journey with Paolo Perrotta @nusco Ever wonder how authoring books compares to writing articles?...
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
DevotionGeo
I have always used antique keyboards like Cherry MX 1800 or Cherry MX 8100 and almost always have modified the switches in some way, like...
New
New
CommunityNews
A Brief Review of the Minisforum V3 AMD Tablet. Update: I have created an awesome-minisforum-v3 GitHub repository to list information fo...
New