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.

Popular Backend topics Top

First poster: bot
There is a long, difficult road from vague, pie-in-the-sky ideas about what would be cool to have in a new programming language, to a rob...
New
First poster: bot
FreeBSD allows the management of multiple instances of PostgreSQL by means of rc.conf(5) . The trick is to use profiles , that are avail...
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
First poster: bot
Why Lisp? A lot of people ask us the question, why do we choose to use Common Lisp as our primary development language? Often times the q...
New
New
CommunityNews
Letting Go of Random. In a recent post I shared some thoughts about art and included a few, somewhat tongue-in-cheek comments about the ...
/go
New
New
First poster: bot
GitHub - audulus/rui: Experimental Rust UI library. Experimental Rust UI library. Contribute to audulus/rui development by creating an a...
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: 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

Other popular topics Top

AstonJ
Or looking forward to? :nerd_face:
New
dasdom
No chair. I have a standing desk. This post was split into a dedicated thread from our thread about chairs :slight_smile:
New
AstonJ
Curious to know which languages and frameworks you’re all thinking about learning next :upside_down_face: Perhaps if there’s enough peop...
New
Rainer
My first contact with Erlang was about 2 years ago when I used RabbitMQ, which is written in Erlang, for my job. This made me curious and...
New
AstonJ
In case anyone else is wondering why Ruby 3 doesn’t show when you do asdf list-all ruby :man_facepalming: do this first: asdf plugin-upd...
New
PragmaticBookshelf
Learn different ways of writing concurrent code in Elixir and increase your application's performance, without sacrificing scalability or...
New
gagan7995
API 4 Path: /user/following/ Method: GET Description: Returns the list of all names of people whom the user follows Response [ { ...
New
Maartz
Hi folks, I don’t know if I saw this here but, here’s a new programming language, called Roc Reminds me a bit of Elm and thus Haskell. ...
New
PragmaticBookshelf
Author Spotlight James Stanier @jstanier James Stanier, author of Effective Remote Work , discusses how to rethink the office as we e...
New
PragmaticBookshelf
A Ruby-Centric Chat with Noel Rappin @noelrappin Once you start noodling around with Ruby you quickly figure out, as Noel Rappi...
New