This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-06-16
Channels
- # admin-announcements (72)
- # beginners (41)
- # boot (93)
- # cider (50)
- # clojure (173)
- # clojure-berlin (19)
- # clojure-dev (2)
- # clojure-greece (3)
- # clojure-israel (2)
- # clojure-italy (32)
- # clojure-japan (33)
- # clojure-nl (8)
- # clojure-russia (3)
- # clojure-seattle (1)
- # clojure-sg (1)
- # clojure-spain (16)
- # clojure-uk (4)
- # clojure-ukraine (1)
- # clojurescript (170)
- # code-reviews (20)
- # core-async (3)
- # datomic (5)
- # docs (28)
- # editors (17)
- # euroclojure (2)
- # events (7)
- # instaparse (18)
- # jobs (25)
- # ldnclj (11)
- # om (26)
- # overtone (3)
- # remote-jobs (3)
- # sneer (1)
@gmorpheme: I didn’t now about mapcat
…
@gmorpheme: anyway, you’re right coord-list is much more simple with a for
loop
(def files ["a" "b" "c" "d" "e" "f" "g" "h”])
(def coord-list
(for [rank (range 8 0 -1)
file files]
(keyword (str file rank))))
today I’m going to do some refactoring
cool! I often find that I go first for something cunning with map, filter et al but for
ends up giving a much neater simpler expression
similarly - I always worry if I end up reaching for flatten
. More often than not it means I’ve lost track of the nesting going on and the rest of the expression is complicated enough that it’s blown my mental stack. Usually a signal that I’ve gone a bit too far down the wrong track.
@gmorpheme: core.typed helps me with keeping the nested structures handeable
sveri: Haven't used it myself, but it seems like prismatic schema is nice for this as well.
@slipset: I was tinkering between prismatic and core.typed a few times. What I like more about core.typed that it's a "compile time" check, not interfering with the runtime (not sure about prismatic though, I never really dived into it). However, I guess both do the job fine. Especially when coming back to a code base after a few days/weeks/months and you see the param "foo-m" which means it's a map with, yea, what is foo, ah, go back to that function, oh, there is a foo-m param too, goddamnit, what was that 😄