Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Probably unnecessary function calls in expanded form #5

Open
postatum opened this issue Sep 6, 2016 · 2 comments
Open

Probably unnecessary function calls in expanded form #5

postatum opened this issue Sep 6, 2016 · 2 comments
Labels

Comments

@postatum
Copy link
Contributor

postatum commented Sep 6, 2016

If I understand correctly, this code wraps type in a vector and does a call to expanded-form to make it be processed by code in this cond case.

If what I wrote is correct, then I think these two calls are unnecessary, because process-properties and process-items of result is already performed in recursive call to expanded-form here.

@postatum postatum changed the title Unnecessary function calls in expanded form Probably unnecessary function calls in expanded form Sep 6, 2016
@antoniogarrote
Copy link
Contributor

Sorry, the links are not pointing to the right lines anymore.

Would you mind linking the original commit.

Thanks.

@postatum
Copy link
Contributor Author

postatum commented Sep 9, 2016

Updated issue description. Below are code snippets, maybe this will help.


      (map? type)                             ;; simple inheritance
                                              (let [result (expanded-form-inner (assoc type-node :type [type]) context)]
                                                (-> result
                                                    (process-properties context)
                                                    (process-items context)
                                                    (assoc :type (first (:type result)))))
      ;; Multiple inheritance
      (and (not (map? type))
              (coll? type))
                                                    (process-properties context)
                                                    (process-items context)

@jstoiko jstoiko added the 0.1.x label Aug 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants