This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-07-05
Channels
- # babashka (1)
- # beginners (75)
- # clojure (8)
- # clojure-uk (7)
- # clojurescript (14)
- # code-reviews (6)
- # conjure (5)
- # cursive (13)
- # data-science (1)
- # datomic (46)
- # fulcro (10)
- # helix (15)
- # jackdaw (1)
- # jobs-discuss (10)
- # jobs-rus (1)
- # off-topic (17)
- # pathom (1)
- # re-frame (19)
- # releases (1)
- # spacemacs (9)
- # sql (29)
- # test-check (18)
- # tools-deps (6)
- # xtdb (3)
clojurescript doesn't run this (_re-matches_ #"^\S{1,}\/\S{1,}$" "users/232")
it says browser.cljs:220 repl/invoke error SyntaxError: Invalid regular expression flags
this regex works fine on
why I can't run same regex on cljs?
thank you it works now. why this needed to be removed how can I learn more about this issue
/
is a regular character, you don't need to escape it in general.
You only need to escape it in JavaScript because it uses /
to denote the start and the end of a regexp.
I want to swap axis in a 2-dimensional vector:
[["A" "2"]
["B" "7"]
["C" "4"]]
[["A" "B" "C"]
["2" "7" "4"]]
All my tries so far become very hairy very fast... I'm certain that somebody else have already solved this (and very likely much better than I can)?
nice thanks 👍
much better than my loop-recur
😆
Not in front of my laptop, but another option might be something like:
(partition
(count coll)
(apply interleave coll)
the version that @UCPGSBNQ4 shows is one of the classic examples of clojure's elegance
