Commit Graph

4 Commits

Author SHA1 Message Date
Paul Tagliamonte
1dc26148c6 Merge branch 'master' into paultag/ana/if
Conflicts:
	hy/contrib/anaphoric.hy
2013-12-26 17:57:29 -05:00
Abhishek L
c69c14cc7d contrib/anaphoric: More anaphoric macros added
* hy/contrib/anaphoric.hy: The following anaphoric macros have been
  added
  `ap-reject` : Opposite of ap-filter, yields the elements when a `pred`
  evaluates to false
  `ap-dotimes` : Execute body forms (possibly for side-effects) n times
  with `it` bound from 0 to n-1
  `ap-first` : return the first element that passes predicate
  `ap-last`  : return the last element that passes predicate
  `ap-reduce`: anaphoric form of reduce that allows `acc` and `it` to
  create a function that is applied over the list

* docs/contrib/anaphoric.rst: updated docs to reflect these changes

* tests/__init__.py: updated to explicitly include tests for anaphoric
  macros
2013-12-26 05:57:06 +02:00
Paul Tagliamonte
6172b60e75 Add anaphoric if statement 2013-12-25 12:14:26 -05:00
agentultra
179017b9bd Move anaphoric macros to contrib module 2013-11-28 23:53:02 -05:00