Files
infix/README.md
2020-02-27 17:22:03 +01:00

22 lines
497 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# infix
A sketch for an infix-to-prefix transformer in Carp (used for match).
Its based on my sketchy recollection of something Ive maybe seen in SICP,
and something I implemented years ago for zeptos standard library.
Its mostly instructional and I dont recommend you actually use it.
## Usage
After loading `infix.carp`, youll be able to use it like this:
```clojure
(infix 10 * 5 + 3 / 12 pow 2)
; will transform into (+ (* 10 5) (/ 3 (pow 12 2)))
```
<hr/>
Have fun!