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

[WIP] condp, if-not, when-not and not= #1

Closed
wants to merge 4 commits into from
Closed

[WIP] condp, if-not, when-not and not= #1

wants to merge 4 commits into from

Conversation

yurrriq
Copy link

@yurrriq yurrriq commented Dec 28, 2015

Per lfe-deprecated/clj#15, lfe-deprecated/clj#10, lfe-deprecated/clj#11, lfe-deprecated/clj#12 and lfe-deprecated/clj#19.

(condp {{(lambda (a b) ...) | #'f/2 | #'m:f/2}} x
  y z
  q {{(lambda (a) ...) | #'f/1 | #'m:f/1}}
  {{optional default}})

I'm very open to alternate strategies/decisions here, but I wanted to get an initial version written.
It would be great if not= weren't a macro, but this way it can be variadic like its Clojure analog.

@yurrriq
Copy link
Author

yurrriq commented Dec 28, 2015

Should we rename not= to not==?

@yurrriq yurrriq closed this Apr 20, 2016
@yurrriq yurrriq reopened this Apr 20, 2016
yurrriq added 4 commits April 19, 2016 20:36
Prefer LFE idioms to Clojure, per discussion, i.e. remove the local
fun*/2 and its invocations.

Reindent the fletrec form manually.

Related:
- lfe-deprecated/clj#19
- lfe#137
- Rename clj-conditionals -> clj-macros.
- Add src/clj.lfe which includes and re-exports the conditional macros.
- Move comments into docstrings, since they're now supported.
@oubiwann
Copy link
Owner

There are some test errors, so I'm guessing you're still working on this?

(`(,x . ()) 'false)
(`(,x ,y . ,more) `(not (== ,x ,y ,@more))))


Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good stuff, man -- I'm super-excited about it :-)

@yurrriq
Copy link
Author

yurrriq commented Apr 20, 2016

The export-macro approach has some kinks. I got distracted with it last night (and also with writing property tests for conj which is still local). I'll likely look into it more tonight.

@yurrriq
Copy link
Author

yurrriq commented Apr 20, 2016

The test failure is due to duplicate definitions between include/clj.lfe and src/clj.lfe, so we still have to decide which definitions should feel like part of the language and which should be called with a clj: prefix.

@oubiwann
Copy link
Owner

No worries on any count. My intent was to make sure I wasn't implicitly blocking a merge in the event you had been expecting one :-)

@yurrriq
Copy link
Author

yurrriq commented Apr 20, 2016

Nope. I'll rename the PR then remove "[WIP]" when I think it's ready.

@yurrriq yurrriq changed the title Add condp, if-not, when-not and not= [WIP] condp, if-not, when-not and not= Apr 20, 2016
@yurrriq yurrriq closed this Apr 26, 2016
@yurrriq yurrriq mentioned this pull request Apr 26, 2016
oubiwann pushed a commit that referenced this pull request Oct 24, 2016
oubiwann pushed a commit that referenced this pull request Sep 9, 2020
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

Successfully merging this pull request may close these issues.

2 participants