Commit Graph

86 Commits

Author SHA1 Message Date
Tristan Cacqueray
d793cee90a add tuple? function hy.core
`tuple?` will test if the argument is an instance of tuple.
2019-04-23 15:25:49 -04:00
Tristan Cacqueray
b0ed103931 add list? function to hy.core
`list?` will test if the argument is an instance of list.
2019-04-09 00:07:10 +00:00
Brandon T. Willard
690416b3d6 Update description of eval in core.rst 2018-11-28 17:08:10 -06:00
Philip Xu
0b08916174 Fix typos and improve code examples 2018-05-16 18:25:53 -04:00
Philip Xu
643196c2b8 Remove mixtures of tabs and spaces 2018-05-15 23:29:07 -04:00
Kodi Arfer
bbf669d407 Update docs and NEWS for HyCons removal 2018-04-12 16:45:17 -07:00
Simon Gomizelj
69202df23d Update documentation and add a NEW entry 2018-04-07 22:29:20 -07:00
Kodi Arfer
eda0b89f67 Document mangling 2018-03-13 14:56:49 -04:00
Simon Gomizelj
0cd4df3898 Remove def and standardize on setv 2018-01-21 00:25:33 -05:00
gilch
d38956fb9e remove trailing commas in HyDict reprs 2017-09-18 01:03:00 -06:00
gilch
af8d209496 update docs for new hy model reprs 2017-09-08 10:59:57 -07:00
Kodi Arfer
ecc974de1e Implement Python 2 exec
The implementation of `hy.core.language.exec` draws code from the `exec_` function in commit f574c7be6ebc80041ef58ca29588f310248ebed4 of the library Six, which is copyright 2010–2017 Benjamin Peterson and licensed under the Expat license.
2017-08-02 13:33:59 -04:00
Kodi Arfer
3f3cce8785 Update docs: apply is gone; #* and #** are in 2017-07-19 11:00:43 -07:00
Kodi Arfer
ca95194240 Change eval from a special form to a function 2017-06-27 08:14:29 -06:00
Yuval Langer
687d750a88 Remove stray use of setf in documentation 2017-05-19 13:36:06 -07:00
Kodi Arfer
8b6a45e43a Remove car and cdr in favor of first and rest (#1241)
* Remove uses of `car` and `cdr` in /hy

* Remove uses of `car` and `cdr` in quote tests

* Remove `car` and `cdr` in favor of `first` and `rest`

I beefed up the documentation and tests for `first` and `rest` while I was at it.

I defined `car` and `cdr` in native_tests.cons so the tests read a bit more naturally.
2017-03-06 10:34:40 -06:00
Kodi Arfer
484daafa53 Move hy.core.reserved to hy.extra.reserved (#1231)
It was an odd one out by being in hy.core but needing to be called by a qualified name. It's at home in hy.extra.
2017-03-02 16:49:32 -06:00
Kodi Arfer
3ec919278d Remove let from documentation 2017-02-13 09:12:21 -08:00
Kodi Arfer
5df8f38d75 Merge branch 'itertools-docs' 2017-01-04 15:14:04 -08:00
Kodi Arfer
c8171bc0c5 Itertools docs edits 2017-01-04 15:11:54 -08:00
gilch
b9106de1ab list all itertools 2017-01-04 13:04:41 -07:00
Kodi Arfer
0c4d416a37 juxt documentation edits 2016-12-26 13:26:44 -08:00
Philip Xu
7dfb9602f8 Add juxt documentation 2016-12-25 17:02:51 -05:00
Philip Xu
24359336f7 Remove trailing whitespace 2016-12-25 16:59:41 -05:00
Tuukka Turto
71f30e845d Add comp, constantly and complement (#1179)
* Add comp, constantly and complement

relates #1176

* Fix composition order in comp

* comp without parameters returns identity

* Doc edits for comp, complement, constantly

* Test that `(comp)` returns `identity` exactly

* Simplify the `reduce` call in `comp`

* updated version of comp
2016-12-25 13:11:25 -07:00
accraze
0379fa1b36 added itertools docs
fixes #954
2016-12-22 16:20:30 -08:00
Kodi Arfer
5b85990d87 Add a module for getting reserved words (#1171)
This is helpful for writing syntax highlighters (e.g., https://github.com/hylang/hy/pull/1170).
2016-12-12 10:11:42 +02:00
Kodi Arfer
ed8e37da62 Burninate the synonyms true, false, and nil
Per the straw poll in #908, as an alternative to #1147.

Now you must use `True`, `False`, and `None`, as in Python. Or just assign `true` to `True`, etc.; the old synonyms aren't reserved words anymore.
2016-11-23 18:35:17 -08:00
Jakub Wilk
313dff5548 Fix typo 2016-06-11 01:04:07 +02:00
Csilla Nagyne Martinak
f73c862ffa docs: Document the (keyword) and (name) functions
Closes #733

Signed-off-by: Csilla Nagyne Martinak <csilla@csillger.hu>
2015-10-17 13:56:35 +02:00
Gergely Nagy
32f5d5dea7 Drop a set of brackets from with.
This changes with syntax from (with [[x (expr)] (expr)] ...) to (with
[x (expr) (expr)] ...). Should have no ill side effects apart from the
syntax change.

Closes #852.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2015-10-01 10:08:04 +02:00
Gergely Nagy
9f88e07e1d Drop a set of brackets from let.
This changes let to use a flat list of symbol-value pairs instead of a
vector of vectors. One side effect is that (let [[a 1] z]) is not
expressible now, and one will explicitly need to set a nil value for z,
such as: (let [a 1 z nil]).

Closes #713.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2015-10-01 10:08:04 +02:00
Gergely Nagy
9569537f8c Merge pull request #929 from gilch/itertools
Itertools
2015-10-01 10:03:16 +02:00
Gregor Best
2e1b2ff591 Merge pull request #928 from gilch/partition
Enhanced partition
2015-09-06 16:54:23 +02:00
gilch
6f93de68d7 added remaining itertools
Some names have been changed.
Removed redundant zipwith.
Made `first` and `last` more efficient.
2015-09-03 11:45:55 -06:00
gilch
4896980373 enhance partition 2015-09-02 22:54:24 -06:00
Tim Martin
818ed5da72 Added documentation for the (keyword?) function 2015-08-31 20:35:37 +01:00
gilch
66c1f38fcc remove catch in favor of except 2015-08-09 00:53:10 -06:00
Berker Peksag
2963ce6121 Tweak partition link. 2015-08-06 07:10:39 +03:00
gilch
bb00e709ee add partition form to core
the 2 argument version of Clojure's partition.

pre-expand ->> macro in partition

Docstring for partition.

add test-partition

Document partition.
2015-08-05 21:38:11 -06:00
Gregor Best
98704ddd1a fix typo 2015-07-30 16:07:25 +02:00
Gregor Best
0146cc8e4d Add docs for read-str 2015-07-30 16:07:25 +02:00
Ryan Gonzalez
016d25d104 Add one-argument division and rationals (closes #825 and #826) 2015-07-29 13:30:24 -05:00
Zhao Shenyang
487710c093 add documents for symbol? 2015-01-30 01:21:26 +08:00
Kevin Yap
8c0ac0862f Adhere to CPython's documentation guidelines
- Inline code is written using ``double backticks``
- Italicized text uses *asterisks* rather than `single backticks`
- Function parameters are italicized rather than written as inline code
2014-12-07 02:09:43 -08:00
Kevin Yap
d50485710c Change documentation code block language to Hy 2014-12-07 02:03:35 -08:00
Kevin Yap
d657e5eb2d Fixes to contributor module documentation
- Changed "Contrib" to "Contributor"
- Fixed mismatched inline code in list* usage
- Added missing hyperlink targets
2014-12-06 15:47:01 -08:00
Kevin Yap
997501bcc4 Fixes to language documentation
- Use backticks consistently for inline code
- Capitalize section headers and proper nouns
- Minor grammatical fixes
2014-12-06 15:46:44 -08:00
Paul Tagliamonte
ec593154fe Merge branch 'master' into pr/637
Conflicts:
	hy/core/language.hy
2014-11-15 07:58:56 -05:00
Berker Peksag
377c3ec5ee Update versionadded directive for merge-with. 2014-10-09 02:58:42 +03:00