Skip to content

Clojure-style discarding #479

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ deprecated forms.
* Stack traces from macro errors shouldn't contain compiler internals.
* Look for macros in `.fnlm` files in addition to `.fnl` files.
* Support `extra-env` in compiler API when evaluating in compiler scope.
* Add support for discarding (Clojure's `#_`).

### Bug Fixes

Expand Down
14 changes: 14 additions & 0 deletions from-clojure.md
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,20 @@ other macros.

Lists and symbols are strictly compile-time concepts in Fennel.

## Discards

Just like Clojure, Fennel supports the `#_` <https://clojure.org/guides/weird_characters#_discard>

```fennel
[1 #_ {:a :b} 3 #_ #_ (+ 4 5) 6 7 #_]
```

expands to

```fennel
[1 3 7]
```

## Errors

There are two kinds of ways to represent failure in Lua and
Expand Down
861 changes: 390 additions & 471 deletions man/man3/fennel-api.3

Large diffs are not rendered by default.

Loading