Pull requests

#1 Merged
Repository
evhan evhan
Branch
master
Repository
DerGuteMoritz DerGuteMoritz
Branch
master

extend thrush to accept non-parenthesized clauses

Author
  1. evhan
Reviewers
Description

This allows bare procedure names to be given as clauses in thrush forms when the parentheses aren't necessary, for example:

(-> 14 (+ 2) sqrt (- 2) inexact->exact) ; => 2
  • Learn about pull requests

Comments (2)

  1. Moritz Heidkamp repo owner

    Hey, thanks a lot for your patch! I actually conciously decided to leave out the non-parenthesized syntax because I found it a bit confusing. Back then I found it less obvious that a function application was going on. By now I'm rather used to it from Clojure, though, and I even find that it makes some APIs very pleasant (like clj-time, for example). So alright, let's do this :-)

  2. evhan author

    Thanks Moritz. Yeah, I think it makes it more convenient to compose things without having to switch over to "syntax mode" mentally, when you don't need to. Anyway, I appreciate it, cheers!