This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-09-26
Channels
- # announcements (2)
- # asami (2)
- # aws (34)
- # babashka (6)
- # beginners (9)
- # calva (76)
- # chlorine-clover (10)
- # circleci (5)
- # clj-kondo (2)
- # clojure (40)
- # clojure-australia (3)
- # clojure-europe (15)
- # clojurescript (39)
- # conjure (1)
- # core-async (4)
- # cursive (4)
- # datahike (1)
- # datomic (69)
- # figwheel-main (1)
- # graalvm (16)
- # honeysql (9)
- # hyperfiddle (2)
- # jobs-discuss (2)
- # lsp (36)
- # luminus (1)
- # malli (11)
- # off-topic (13)
- # pathom (1)
- # portal (1)
- # portkey (3)
- # reitit (25)
- # reveal (1)
- # rewrite-clj (5)
- # spacemacs (2)
- # sql (4)
- # vrac (90)
• Can I make some setting so print
pretty prints for the rest of the repl session?
---
(with-out-str
(for [name ["hurr"]]
(println name)))
for
makes a lazy seq but I'm not sure what a good alternative is, then. I can call seq
and it worksThe equivalent of for
in c style languages is doseq
. However, your writing code that is joining a list of strings together and returning a single string. So you could use clojure.string/join
. Other things to think about is that for
is equivalent to map
and (apply str ["foo" "bar"])
will return "foobar"
. println
is a side-effecting function that prints something on standard out and returns nil
... When learning Clojure, it helps to get into the mindset of using a REPL (preferably from within your editor) to call functions that return values with no side effects as much as possible, and push all the side effects to the edges of your program.
Hi, from what I heard there should be Datomic channel here, can’t find it though..