This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-03-26
Channels
- # architecture (2)
- # beginners (310)
- # boot (34)
- # cider (50)
- # cljs-dev (82)
- # cljsrn (1)
- # clojure (125)
- # clojure-dusseldorf (1)
- # clojure-hamburg (1)
- # clojure-italy (47)
- # clojure-russia (21)
- # clojure-spec (38)
- # clojure-uk (36)
- # clojurescript (200)
- # community-development (21)
- # cursive (10)
- # datomic (15)
- # duct (58)
- # emacs (20)
- # fulcro (10)
- # funcool (1)
- # graphql (2)
- # hoplon (6)
- # jobs (1)
- # lumo (12)
- # mount (20)
- # off-topic (14)
- # om (5)
- # portkey (43)
- # protorepl (2)
- # re-frame (31)
- # reagent (36)
- # ring (17)
- # ring-swagger (6)
- # shadow-cljs (50)
- # spacemacs (9)
- # sql (5)
- # tools-deps (28)
- # uncomplicate (4)
- # unrepl (5)
- # vim (2)
- # yada (2)
@U0514TE0F а вот эту либу видел? https://github.com/metabase/toucan
От авторов metabase, а они то на скл собаку съели
сликом ООПшно выглядит - я люблю данные - https://github.com/niquola/ql. Как доделаю покажу как топ левел интерфейсы на ней делать сравнимые с ORMами
а что именно бесит?
Слушайте, а нафига у редьюса есть возможность работать с функцией принимающей 1 и только 1 аргумент?
(reduce #(do (println %) %) -1 (range 5))
Типа вот пример. Редьюс положит инициализирующий элемент в аккумулятор и дальше цикл поочередных выкидываний элементов последовательности: [возьмёт следующий элемент последовательности, выкинет его, отправит аккумулятор в функцию, поместит результат в аккумулятор]
Дока редьюса говорит:
-------------------------
cljs.core/reduce
([f coll] [f val coll])
f should be a function of 2 arguments. If val is not supplied, returns the result of applying f to the first 2 items in coll, then applying f to that result and the 3rd item, etc. If coll contains no items, f must accept no arguments as well, and reduce returns the result of calling f with no arguments. If coll has only 1 item, it is returned and f is not called. If val is supplied, returns the result of applying f to val and the first item in coll, then applying f to that result and the 2nd item, etc. If coll contains no items, returns val and f is not called.
> f should be a function of 2 arguments.
Зачем позволено юзать функцию 1 аргумента?
хм, действительно
Спасибо
((fn [x y] [x y]) 1 2 3)
Вот пример попроще
А зачем/почему cljs позволяет вызывать с неправильным кол-вом аргументов?
Понял, спасибо