use cond-> when you need to add optional parameter, like this
(let [x 2]
(cond-> {:a 1}
(= x 2) (assoc :b 2}))
result will be {:a 1 :b 2}
Получить ссылку
Facebook
X
Pinterest
Электронная почта
Другие приложения
Комментарии
Популярные сообщения из этого блога
вот такие ментальные упражнения в маппинге DSL на SQL запросы просто демотивируют использовать рельсы и джемы https://stackoverflow.com/questions/42288875/constructing-an-activerecord-with-nested-joins-rails-4
Easy peasy. :plugins [[lein-cljsbuild "1.1.4"] [lein-bower "0.5.1"]] Connect bower plugin for lein and do like following lein bower install gentelella all resources will be fetched into resources/public folder of your project.
А-а-а! "There is a gem for exevrything" rails mantra seems to be true! I've a problem assets precompilation in docker environment, and here is solution! Null DB Active record driver. Awesome! Meet the gem, that solves the problem, which should not exist at all! http://blog.zeit.io/use-a-fake-db-adapter-to-play-nice-with-rails-assets-precompilation/
Комментарии
Отправить комментарий