1. Moritz Heidkamp
  2. clojurian

Pull requests

#2 Merged
Repository
janherich
Branch
master
Repository
DerGuteMoritz
Branch
master

Add 'as->' macro to syntax

Author
  1. Jan Herich
Reviewers
Description

This commits adds 'as->' macro (part of the Clojure since 1.5) to the syntax.

  • Learn about pull requests

Comments (4)

  1. Moritz Heidkamp repo owner

    Hi Jan, thanks a lot for your contribution which I'll gladly integrate! However, your implementation does not quite correspond to the one in Clojure with regards to how the rest forms are handled. This test case currently does not pass:

    (test 2 (as-> 1 x (+ x 3) (/ x 2)))
    

    Can you adapt it accordingly?

  2. Jan Herich author

    Hi Moritz, i implemented the changes you suggested, so that the behavior of the macro is identical to Clojure one, even in the case when there are no expressions after initial state and symbol and of course in the case when there are more expressions.