Skip to content

Commit

Permalink
feat(discard): add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
reo101 committed Nov 19, 2024
1 parent 72a32ca commit 991a167
Show file tree
Hide file tree
Showing 6 changed files with 1,634 additions and 2,022 deletions.
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ deprecated forms.
* Accept `:global-mangle false` in compiler opts to disable global mangling.
* Macro sandbox can now read (but not write) files.

### New Features

* Add support for discarding (Clojure's `#_`).

### Bug Fixes

* Work around string formatting bug in Fengari.
Expand Down
14 changes: 14 additions & 0 deletions from-clojure.md
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,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
Loading

0 comments on commit 991a167

Please # to comment.