Fork me on GitHub
#lsp
<
2022-01-17
>
Noah Bogart18:01:54

funny “thread last all” change

😆 3
ericdallo18:01:03

😂 I'm not even sure if it's correct

ericdallo18:01:11

oh, it's not

ericdallo18:01:18

since for it's a macro

ericdallo18:01:45

maybe we should consider not return thread last for those cases, seems kind of too specific though

Noah Bogart18:01:39

using macroexpand, looks like it’s “correct” but very awkward:

(clojure.core/macroexpand
  '(->> [uid [:lobby/list lobby-summaries]]
        (let [filtered-lobbies (filter-lobby-list lobbies user)
                 lobby-summaries (summaries-for-lobbies filtered-lobbies)])
        (for [user users
               :let [uid (:uid user)]])
        (into [])))
(into
 []
 (for
  [user users :let [uid (:uid user)]]
  (let
   [filtered-lobbies
    (filter-lobby-list lobbies user)
    lobby-summaries
    (summaries-for-lobbies filtered-lobbies)]
   [uid [:lobby/list lobby-summaries]])))

ericdallo18:01:00

yeah, that's insane 😂

myguidingstar09:01:21

let in such position will make sense if you think it as Haskell's where ;)