Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

28/46 my-comparison #31

Open
AlexanderChenNL opened this issue Dec 31, 2017 · 1 comment
Open

28/46 my-comparison #31

AlexanderChenNL opened this issue Dec 31, 2017 · 1 comment

Comments

@AlexanderChenNL
Copy link

Hi,

what do you want here? dont need the answer perse but would like a more clear explanation so I can program it better. Happy new year !

@ertugrulcetin
Copy link
Member

Hi @AlexanderChenNL thanks for reaching out and happy new year as well!
The thing is first arguments is an aid functions which means you can use it to understand the relation between those numbers(2nd 3th arguments).

Solution would explain itself better than I would:

(defn my-comparison 
  [op a b]
  (cond
    (op a b) :lt
    (op b a) :gt
    :else :eq))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants