hy/tests/native_tests
Kodi Arfer e4a7b317e1 Make fn work like lambda and remove lambda (#1228)
* with-decorator: Allow a `setv` form as the form to be decorated

This feature is of dubious value by itself, but it's necessary to allow `defn` to create a lambda instead of a `def`.

* Make `fn` work the same as `lambda`

That is, allow it to generate a `lambda` instead of a `def` statement if the function body is just an expression.

I've removed two uses of with_decorator in hy.compiler because they'd require adding another case to HyASTCompiler.compile_decorate_expression and they have no ultimate effect, anyway.

In a few tests, I've added a meaningless statement in `fn` bodies to force generation of a `def`.

I've removed `test_fn_compiler_empty_function` rather than rewrite it because it seems like a pain to maintain and not very useful.

* Remove `lambda`, now that `fn` does the same thing
2017-02-22 17:36:52 -06:00
..
contrib Remove uses of let from various tests 2017-02-04 09:07:27 -08:00
extra Remove uses of let from various tests 2017-02-04 09:07:27 -08:00
__init__.hy ideas, ideas. 2013-03-05 18:39:34 -05:00
cons.hy Burninate the synonyms true, false, and nil 2016-11-23 18:35:17 -08:00
core.hy Consolidate hy.models.* and tests/models/* into one file apiece 2017-02-16 19:43:00 -08:00
defclass.hy Remove uses of let from various tests 2017-02-04 09:07:27 -08:00
language.hy Make fn work like lambda and remove lambda (#1228) 2017-02-22 17:36:52 -06:00
mathematics.hy Remove uses of let from various tests 2017-02-04 09:07:27 -08:00
native_macros.hy Add bytestring literals 2017-02-19 09:04:45 +02:00
py3_only_tests.hy Remove uses of let from various tests 2017-02-04 09:07:27 -08:00
quote.hy Burninate the synonyms true, false, and nil 2016-11-23 18:35:17 -08:00
reader_macros.hy defreader: Allow strings as macro names 2015-12-17 13:24:20 +01:00
shadow.hy Remove uses of let from various tests 2017-02-04 09:07:27 -08:00
unless.hy Burninate the synonyms true, false, and nil 2016-11-23 18:35:17 -08:00
when.hy Burninate the synonyms true, false, and nil 2016-11-23 18:35:17 -08:00
with_decorator.hy Make fn work like lambda and remove lambda (#1228) 2017-02-22 17:36:52 -06:00
with_test.hy Drop a set of brackets from with. 2015-10-01 10:08:04 +02:00